Skip to content

Commit

Permalink
adding manual roster management
Browse files Browse the repository at this point in the history
  • Loading branch information
marticardus committed Jan 4, 2013
1 parent 97ee29a commit 71ac7af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xmpp/lib/xmpplogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ public function deleteRoster($jid){
$xml->presence->addAttribute('to',$jid);
$xml->presence->addAttribute('type','unsubscribe');
$this->send_xml($xml->asXML());

$xml=$this->newBody();
$xml->addChild('presence');
$xml->presence->addAttribute('from',$this->username.'@'.$this->domain);
$xml->presence->addAttribute('to',$jid);
$xml->presence->addAttribute('type','unsubscribed');
$this->send_xml($xml->asXML());

$xml=$this->iq('set',null,$jid,$this->jid);
$xml->iq->addChild('query','','jabber:iq:roster');
$xml->iq->query->addAttribute('jid',$jid);
$xml->iq->query->addAttribute('subscription','remove');
$this->send_xml($xml->asXML());
}

public function addUser($jid,$passwd,$passwdverify){
Expand Down

0 comments on commit 71ac7af

Please sign in to comment.