1
votes

I'm trying to write a module, which triggers a HTTP POST to an API when a user receives an offline message in ejabberd. It's for an iOS app which supports Push notifications.

I followed the guide on http://jasonrowe.com/2011/12/30/ejabberd-offline-messages/

I tested the code in the blog post. Most parts are working, but the from attribute is missing in the intercepted offline message. As you can see in the above blog post, the author's screen shot has the same problem, too. So, how can I get the sender's account name in an offline message Packet?

Did I miss something or is it a bug (in offline message, from attribute is just missing)?

BTW, I configured shared roster 'Everyone' in my ejabberd config, which allows everyone to see everyone as 'contacts'. I'm not sure if it's the reason.

Thanks :)

2

2 Answers

2
votes

Please use the below blog , it is very simple and usful, it is works fine for me.

http://symmetricinfinity.com/2013/01/23/ios-push-notifications-from-ejabberd.html

Thanks,

0
votes

I've got the same issue and change the message package in Client code will fix this. Simple add 'from' attribute to it :)