4
0
mirror of https://github.com/cwinfo/envayasms.git synced 2025-07-01 12:56:17 +00:00

keep backlogged outgoing messages in priority queue; allow server to set priority of outgoing messages; reschedule messages until the next time the android sending limit would not be exceeded

This commit is contained in:
Jesse Young
2011-09-28 14:46:16 -07:00
parent faffc6c568
commit 31085128eb
10 changed files with 325 additions and 66 deletions

View File

@ -125,7 +125,8 @@ class EnvayaSMS_Request
{
$id = isset($message->id) ? " id=\"".EnvayaSMS::escape($message->id)."\"" : "";
$to = isset($message->to) ? " to=\"".EnvayaSMS::escape($message->to)."\"" : "";
echo "<sms$id$to>".EnvayaSMS::escape($message->message)."</sms>";
$priority = isset($message->priority) ? " priority=\"".$message->priority."\"" : "";
echo "<sms$id$to$priority>".EnvayaSMS::escape($message->message)."</sms>";
}
echo "</messages>";
return ob_get_clean();
@ -137,6 +138,7 @@ class EnvayaSMS_OutgoingMessage
public $id; // ID generated by server
public $to; // destination phone number
public $message; // content of SMS message
public $priority; // integer priority, higher numbers will be sent first
}
class EnvayaSMS_Action