{"action":"created","issue":{"url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/11","repository_url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm","labels_url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/11/comments","events_url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/11/events","html_url":"https://github.com/mrDoctorWho/ejabberd_mod_gcm/issues/11","id":169166298,"number":11,"title":"The PUSH is not being send by the module","user":{"login":"MattCorte","id":19308189,"avatar_url":"https://avatars.githubusercontent.com/u/19308189?v=3","gravatar_id":"","url":"https://api.github.com/users/MattCorte","html_url":"https://github.com/MattCorte","followers_url":"https://api.github.com/users/MattCorte/followers","following_url":"https://api.github.com/users/MattCorte/following{/other_user}","gists_url":"https://api.github.com/users/MattCorte/gists{/gist_id}","starred_url":"https://api.github.com/users/MattCorte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattCorte/subscriptions","organizations_url":"https://api.github.com/users/MattCorte/orgs","repos_url":"https://api.github.com/users/MattCorte/repos","events_url":"https://api.github.com/users/MattCorte/events{/privacy}","received_events_url":"https://api.github.com/users/MattCorte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/labels/incomplete","name":"incomplete","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-08-03T15:50:15Z","updated_at":"2016-09-01T07:14:34Z","closed_at":null,"body":"Hello Doctor, I'm trying to use your mod_gcm (and understand how it works) on Ejabberd 16.03, but i have a problem.\r\nFor start..i  have added the mod_gcm.erl in the ejabberd/src dir and also the following in the ejabberd.yml file under the MODULES section\r\n`mod_gcm:\r\n   gcm_api_key: gcm_api_key\r\n`\r\nwhere the last gcm_api_key is a global variable containing my API KEY (private, based on my Android App).\r\nAfter the ejabberd reboot seems ok, the log return a row: mod_gcm:start:159 mod_gcm Has start successfully!.\r\nSo, as next step i've added to my Android XMPPManager Class the method to send the set iq stanza with the server and token (sender gcm registration id) info. This is what i've sent (Android Studio log):\r\n`<iq to='myserveraddr' id='dPqJJ-10' type='set'><register xmlns='https://android.googleapis.com/gcm'><key>f6Es9KFADRQ:APA92bGovzSlDsM3v0vmEaOTbQduDIj2pZbd8TRA_J7fLP_lH1CrhlG-sI62Iyi2L6sNXK0HZAIdFs5F7AUobIVCf4ZVfXxE0tDZek1TNwardz4aa1PbsE8gLzFEx5IQ1MQgdNAymQg-</key></register></iq>`\r\nThe response seems ok (Android Studio log), no error:\r\n`<iq from='myserveraddr' to='1@myserveraddr/f6Es9KFADRQ' id='dPqJJ-10' type='result'/>`\r\n(f6Es9KFADRQ is the device name and is ok)\r\n\r\nIn the Ejabberd log now i can see a row that say that a new user has been registered (1@myserveraddr)... OK!\r\n\r\nDone the above \"registration\" for both the user n.1 and n.2 (with success) i've tried to send a message from user n.1 to the offline user n.2, but on the Ejabberd log i've found the following error:\r\n`mod_gcm:message:89 FORMAT ERROR: \"Offline message ~s [{jid,<<\"1\">>,<<\"myserveraddr\">>,<<\"f6Es9KFADRQ\">>,<<\"1\">>,<<\"myserveraddr\">>,<<\"f6Es9KFADRQ\">>}]`\r\n\r\nthe offline message was not sent.. what can be the problem?\r\n\r\n-- EDIT --\r\n\r\nChanging the mod_gcm.erl INFO_MSG log parameter from [From] to [To]:\r\n`?INFO_MSG(\"Offline message ~s\", [To]),`\r\ni noticed that return the same jid info of the sender (1, myserveraddr, f6Es9KFADRQ), it should be \"2\"?.. but i don't know how to set it\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/comments/243995725","html_url":"https://github.com/mrDoctorWho/ejabberd_mod_gcm/issues/11#issuecomment-243995725","issue_url":"https://api.github.com/repos/mrDoctorWho/ejabberd_mod_gcm/issues/11","id":243995725,"user":{"login":"MattCorte","id":19308189,"avatar_url":"https://avatars.githubusercontent.com/u/19308189?v=3","gravatar_id":"","url":"https://api.github.com/users/MattCorte","html_url":"https://github.com/MattCorte","followers_url":"https://api.github.com/users/MattCorte/followers","following_url":"https://api.github.com/users/MattCorte/following{/other_user}","gists_url":"https://api.github.com/users/MattCorte/gists{/gist_id}","starred_url":"https://api.github.com/users/MattCorte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattCorte/subscriptions","organizations_url":"https://api.github.com/users/MattCorte/orgs","repos_url":"https://api.github.com/users/MattCorte/repos","events_url":"https://api.github.com/users/MattCorte/events{/privacy}","received_events_url":"https://api.github.com/users/MattCorte/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T07:14:33Z","updated_at":"2016-09-01T07:14:33Z","body":"Yes of course, the above log is generated when i try to send a message from user n. 1 to offline user n. 2 (as wrote on my first post), on the Ejabberd admin page i can see the offline messages listed on the queue, and when the user n. 2 go online all the messages are received, so everything works as expected (except the module).  Anyway i'm not receiving anymore the format error message (i think because now the API KEY is correctly took), seems that all the case type of \"normal\" portion of the code is not taken in consideration, maybe because the case is another.. Today i try to add some info log to better understand what is happened."}}
{"actor":{"display_login":"MattCorte"}}