Skip to content

Commit

Permalink
Changes #34
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Jan 24, 2023
1 parent b22cbcf commit d2133b2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bootstrap/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,12 @@ public function processVisitorMessage($eventMessage) {
foreach ($attatchements as $data) {
if ($data['type'] == 'file') {
$messageText .= '[url=' . $data['payload']['url'].']Download file[/url]';
} else if ($data['type'] == 'audio') {
$messageText .= '[url=' . $data['payload']['url'].']Download audio[/url]';
} else if ($data['type'] == 'image') {
$messageText .= '[img]' . $data['payload']['url'].'[/img]';
} else if ($data['type'] == 'location') {
$messageText .= '[url=' . $data['url'].']' . $data['title'] . '[/url] (' . $data['payload']['coordinates']['lat'] . ',' . $data['payload']['coordinates']['long'].')[loc]' . $data['payload']['coordinates']['lat'] . ',' . $data['payload']['coordinates']['long'].'[/loc]';
} else {
$messageText .= 'Unknown type - '.json_encode($data);
}
Expand Down Expand Up @@ -1249,8 +1253,12 @@ public function processVisitorMessage($eventMessage) {
foreach ($attatchements as $data) {
if ($data['type'] == 'file') {
$messageText .= '[url=' . $data['payload']['url'].']Download file[/url]';
} else if ($data['type'] == 'audio') {
$messageText .= '[url=' . $data['payload']['url'].']Download audio[/url]';
} else if ($data['type'] == 'image') {
$messageText .= '[img]' . $data['payload']['url'].'[/img]';
$messageText .= '[img]' . $data['payload']['url'] . '[/img]';
} else if ($data['type'] == 'location') {
$messageText .= '[url=' . $data['url'].']' . $data['title'] . '[/url] (' . $data['payload']['coordinates']['lat'] . ',' . $data['payload']['coordinates']['long'].')[loc]' . $data['payload']['coordinates']['lat'] . ',' . $data['payload']['coordinates']['long'].'[/loc]';
} else {
$messageText .= 'Unknown type - '.json_encode($data);
}
Expand Down Expand Up @@ -1377,6 +1385,8 @@ public function processEchoMessage($eventMessage)
foreach ($attatchements as $data) {
if ($data['type'] == 'file') {
$messageText .= '[url=' . $data['payload']['url'].']Download file[/url]';
} else if ($data['type'] == 'audio') {
$messageText .= '[url=' . $data['payload']['url'].']Download audio[/url]';
} else if ($data['type'] == 'image') {
$messageText .= '[img]' . $data['payload']['url'].'[/img]';
} else if ($data['type'] == 'location') {
Expand Down

0 comments on commit d2133b2

Please sign in to comment.