-# XXX: something of a hack to work around problems with the XMPPHP lib
-
-class Laconica_XMPP extends XMPPHP_XMPP {
-
- function messageplus($to, $body, $type = 'chat', $subject = null, $payload = null) {
- $to = htmlspecialchars($to);
- $body = htmlspecialchars($body);
- $subject = htmlspecialchars($subject);
-
- $jid = jabber_daemon_address();
-
- $out = "<message from='$jid' to='$to' type='$type'>";
- if($subject) $out .= "<subject>$subject</subject>";
- $out .= "<body>$body</body>";
- if($payload) $out .= $payload;
- $out .= "</message>";
-
- $cnt = strlen($out);
- common_log(LOG_DEBUG, "Sending $cnt chars to $to");
- $this->send($out);
- common_log(LOG_DEBUG, 'Done.');
- }
-}
-