{"action":"opened","issue":{"url":"https://api.github.com/repos/WHAnonymous/Chat-API/issues/807","labels_url":"https://api.github.com/repos/WHAnonymous/Chat-API/issues/807/labels{/name}","comments_url":"https://api.github.com/repos/WHAnonymous/Chat-API/issues/807/comments","events_url":"https://api.github.com/repos/WHAnonymous/Chat-API/issues/807/events","html_url":"https://github.com/WHAnonymous/Chat-API/issues/807","id":88984896,"number":807,"title":"onGroupsParticipantsAdd not fired","user":{"login":"MoudiZd","id":11831354,"avatar_url":"https://avatars.githubusercontent.com/u/11831354?v=3","gravatar_id":"","url":"https://api.github.com/users/MoudiZd","html_url":"https://github.com/MoudiZd","followers_url":"https://api.github.com/users/MoudiZd/followers","following_url":"https://api.github.com/users/MoudiZd/following{/other_user}","gists_url":"https://api.github.com/users/MoudiZd/gists{/gist_id}","starred_url":"https://api.github.com/users/MoudiZd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoudiZd/subscriptions","organizations_url":"https://api.github.com/users/MoudiZd/orgs","repos_url":"https://api.github.com/users/MoudiZd/repos","events_url":"https://api.github.com/users/MoudiZd/events{/privacy}","received_events_url":"https://api.github.com/users/MoudiZd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-17T11:01:05Z","updated_at":"2015-06-17T11:01:05Z","closed_at":null,"body":"Hello ! I have number online for most times and i want to detect when someone add this number to a group\r\n\r\nI use this code but without chance\r\n\r\n````\r\nfunction remove_myself($phone_number,$group_id,$contact_id)\r\n    {\r\n        global $w;\r\nfile_put_contents(\"group_to_exit_from.txt\",json_encode(array($phone_number,$group_id,$contact_id)).\"\\n\",FILE_APPEND);\r\n        sleep(2);\r\n    }\r\n\r\nconnect_to_whatsapp(\"xxxxxxxxx\",\"yyyyyyyy\",\"Me\",array(\"onGroupsParticipantsAdd\" => \"remove_myself\"),false);\r\n\r\nfunction connect_to_whatsapp($user_name=\"\",$user_password=\"\",$nickname = \"\",$events = array(\"\"),$debug = false)\r\n    {\r\n        global $w;\r\n        $connected = null;\r\n        $retry = true;\r\n        $username = $user_name;\r\n        $password = $user_password;\r\n        $return_message = \"\";\r\n        while($retry)\r\n            {\r\n                $w = new WhatsProt($username, $password, $nickname,$debug);\r\n                if(is_array($events) && !empty($events))\r\n                    {\r\n                        foreach($events as $event_name => $event_function)\r\n                            {\r\n                                $w->eventManager()->bind($event_name, $event_function);\r\n                            }\r\n                    }\r\n                try\r\n                    {\r\n                        $connect = $w->connect();\r\n                        $login = $w->loginWithPassword($password);\r\n                        $connected = true;\r\n                        //while($w->pollMessage());\r\n                        $w->pollMessage();\r\n                        $retry = false;\r\n                    }\r\n                catch (Exception $ex)\r\n                    {\r\n                        $return_message = $ex->getMessage();\r\n                        $connected = false;\r\n                        if(strpos($ex->getMessage(),'Connection Closed') !== false && strpos($ex->getMessage(),'Connection Closed') != -1)\r\n                            {\r\n                                $retry = true;\r\n                            }\r\n                        else\r\n                            {\r\n                                $retry = false;\r\n                            }\r\n                    }\r\n            }\r\n        return array($connected,$return_message);\r\n    }\r\n\r\n````\r\n\r\nAny Help !\r\n\r\nRegards !"}}