-# XXX: something of a hack to work around problems with the XMPPHP lib
-
-class Laconica_XMPP extends XMPPHP_XMPP {
-
- public function presence($status = null, $show = 'available', $to = null, $type='available', $priority=NULL) {
- if($type == 'available') $type = '';
- $to = htmlspecialchars($to);
- $status = htmlspecialchars($status);
- if($show == 'unavailable') $type = 'unavailable';
-
- $out = "<presence";
- if($to) $out .= " to='$to'";
- if($type) $out .= " type='$type'";
- if($show == 'available' and !$status and is_null($priority)) {
- $out .= "/>";
- } else {
- $out .= ">";
- if($show != 'available') $out .= "<show>$show</show>";
- if($status) $out .= "<status>$status</status>";
- if(!is_null($priority)) $out .= "<priority>$priority</priority>";
- $out .= "</presence>";
- }
-
- $this->send($out);
- }
-}
-