* added payload option to messages
git-svn-id: svn://netflint.net/xmpphp@47 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
@@ -143,14 +143,16 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
|
||||
* @param string $type
|
||||
* @param string $subject
|
||||
*/
|
||||
public function message($to, $body, $type = 'chat', $subject = null) {
|
||||
public function message($to, $body, $type = 'chat', $subject = null, $payload = null) {
|
||||
$to = htmlspecialchars($to);
|
||||
$body = htmlspecialchars($body);
|
||||
$subject = htmlspecialchars($subject);
|
||||
|
||||
$out = "<message from='{$this->fulljid}' to='$to' type='$type'>";
|
||||
if($subject) $out .= "<subject>$subject</subject>";
|
||||
$out .= "<body>$body</body></message>";
|
||||
$out .= "<body>$body</body>";
|
||||
if($payload) $out .= $payload;
|
||||
$out .= "</message>";
|
||||
|
||||
$this->send($out);
|
||||
}
|
||||
|
Reference in New Issue
Block a user