Permalink
Browse files

Merge pull request #169 from dleivag/master

New sendPresence method
  • Loading branch information...
2 parents 7fe0148 + 20900a4 commit 4ec6362c6a85bec34a99250c66ba593214609cfb @veno veno committed Nov 17, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/php/whatsprot.class.php
@@ -326,6 +326,13 @@ public function sendNickname($nickname)
$this->sendNode($messsageNode);
}
+ public function sendPresence($available = true){
+ $messageHash = array();
+ $messageHash["from"] = $this->_phoneNumber.'@'.$this->_whatsAppServer;
+ $messageHash["type"] = ($available) ? 'available' : 'unavailable';
+ $messsageNode = new ProtocolNode("presence", $messageHash, null, "");
+ $this->sendNode($messsageNode);
+ }
protected function DebugPrint($debugMsg)
{

1 comment on commit 4ec6362

pepe02 commented on 4ec6362 Nov 18, 2012

2552

Please sign in to comment.