Merge pull request #475 from xX7/master master
Merge pull request #475 from xX7/master

OnGetGroupParticipants Event

--- a/src/php/whatsprot.class.php
+++ b/src/php/whatsprot.class.php
@@ -642,7 +642,7 @@
      */
     public function sendGetGroupsParticipants($gjid)
     {
-        $msgId = $this->createMsgId("getparticipants");
+        $msgId = $this->createMsgId("getgroupparticipants");
 
         $child = new ProtocolNode("list", array(
             "xmlns" => "w:g"
@@ -2006,6 +2006,15 @@
                                 $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") {