mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
automatically add medias as link if phone does not support mms
This commit is contained in:
parent
4cd52ae9ec
commit
878d820dc2
7 changed files with 20 additions and 39 deletions
|
@ -229,6 +229,18 @@ namespace controllers\internals;
|
|||
];
|
||||
}
|
||||
|
||||
//If adapter does not support mms and the message is a mms, add medias as link
|
||||
if (!$adapter::meta_support_mms_sending() && $mms)
|
||||
{
|
||||
$media_urls = [];
|
||||
foreach ($media_uris as $media_uri)
|
||||
{
|
||||
$media_urls[] = STATIC_HTTP_URL . '/data/public/' . $media_uri['path'];
|
||||
}
|
||||
|
||||
$text .= "\n" . join(' - ', $media_urls);
|
||||
}
|
||||
|
||||
$response = $adapter->send($destination, $text, $flash, $mms, $media_uris);
|
||||
|
||||
if ($response['error'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue