mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 08:56:27 +02:00
Add uid for uniq identification by adapter of a sended sms. Usefull for tracking status
This commit is contained in:
parent
d8839a57d0
commit
89459a0285
5 changed files with 58 additions and 10 deletions
|
@ -31,17 +31,21 @@ namespace controllers\internals;
|
|||
* @param $text : Text of the message
|
||||
* @param string $origin : Number of the sender
|
||||
* @param string $destination : Number of the receiver
|
||||
* @param string $uid : Uid of the sms on the adapter service used
|
||||
* @param string $adapter : Name of the adapter service used to send the message
|
||||
* @param bool $flash : Is the sms a flash
|
||||
* @param string $status : Status of a the sms. By default 'unknown'
|
||||
* @return bool : false on error, new sended id else
|
||||
*/
|
||||
public function create ($at, string $text, string $origin, string $destination, bool $flash = false, ?string $status = 'unknown') : bool
|
||||
public function create ($at, string $text, string $origin, string $destination, string $uid, string $adapter, bool $flash = false, ?string $status = 'unknown') : bool
|
||||
{
|
||||
$sended = [
|
||||
'at' => $at,
|
||||
'text' => $text,
|
||||
'origin' => $origin,
|
||||
'destination' => $destination,
|
||||
'uid' => $uid,
|
||||
'adapter' => $adapter,
|
||||
'flash' => $flash,
|
||||
'status' => $status,
|
||||
];
|
||||
|
@ -58,17 +62,21 @@ namespace controllers\internals;
|
|||
* @param $text : Text of the message
|
||||
* @param string $origin : Number of the sender
|
||||
* @param string $destination : Number of the receiver
|
||||
* @param string $uid : Uid of the sms on the adapter service used
|
||||
* @param string $adapter : Name of the adapter service used to send the message
|
||||
* @param bool $flash : Is the sms a flash
|
||||
* @param ?string $status : Status of a the sms. By default null -> unknown
|
||||
* @return bool : false on error, true on success
|
||||
*/
|
||||
public function update_for_user (int $id_user, int $id_sended, $at, string $text, string $origin, string $destination, bool $flash = false, ?string $status = null) : bool
|
||||
public function update_for_user (int $id_user, int $id_sended, $at, string $text, string $origin, string $destination, string $uid, string $adapter, bool $flash = false, ?string $status = null) : bool
|
||||
{
|
||||
$sended = [
|
||||
'at' => $at,
|
||||
'text' => $text,
|
||||
'origin' => $origin,
|
||||
'destination' => $destination,
|
||||
'uid' => $uid,
|
||||
'adapter' => $adapter,
|
||||
'flash' => $flash,
|
||||
'status' => $status,
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue