Skip to content

Commit

Permalink
Merge pull request #475 from xX7/master
Browse files Browse the repository at this point in the history
OnGetGroupParticipants Event
  • Loading branch information
shirioko committed Sep 18, 2013
2 parents ff69122 + 1b04ed7 commit ed3fb39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/php/whatsprot.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public function sendGetGroupsOwning()
*/
public function sendGetGroupsParticipants($gjid)
{
$msgId = $this->createMsgId("getparticipants");
$msgId = $this->createMsgId("getgroupparticipants");

$child = new ProtocolNode("list", array(
"xmlns" => "w:g"
Expand Down Expand Up @@ -2006,6 +2006,15 @@ protected function processInboundData($data)
$groupList
));
}
if($node->getAttribute('id') == 'getgroupparticipants'){
$groupId = reset(explode('@', $node->getAttribute('from')));
$this->eventManager()->fire('onGetGroupParticipants', array(
$this->phoneNumber,
$groupId,
$groupList
));
}

}
}
if ($node->getTag() == "iq" && $node->getAttribute('type') == "error") {
Expand Down

0 comments on commit ed3fb39

Please sign in to comment.