mrDoctorWho / ejabberd_mod_apns

An ejabberd module to send PUSH messages to iOS devices through APNS
MIT License
33 stars 19 forks source link

Update to support ejabberd 16.10+ #17

Closed CreativeWolf closed 6 years ago

CreativeWolf commented 7 years ago

Hi,

When the user send the App to background, user is shown as last seen and the messages are stored under Offline Messages.

The log file shows this:

2017-02-03 19:13:14.936 [error] <0.6600.0>@ejabberd_hooks:run1:332 {function_clause,[{fxml,get_tag_attr_s,[<<"type">>,{message,<<"njhoW-117">>,chat,<<>>,{jid,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>,<<"cw">>,<<"chat.kaching.me">>,<<"chat.kaching.me">>},{jid,<<"9578353705">>,<<"chat.kaching.me">>,<<>>,<<"9578353705">>,<<"chat.kaching.me">>,<<>>},[],[{text,<<>>,<<"Good">>}],undefined,[{xmlel,<<"request">>,[{<<"xmlns">>,<<"urn:xmpp:receipts">>}],[]}],#{}}],[{file,"src/fxml.erl"},{line,169}]},{mod_apns,message,3,[{file,"src/mod_apns.erl"},{line,78}]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,382}]},{ejabberd_hooks,run1,3,[{file,"src/ejabberd_hooks.erl"},{line,329}]},{ejabberd_sm,route,3,[{file,"src/ejabberd_sm.erl"},{line,126}]},{ejabberd_local,route,3,[{file,"src/ejabberd_local.erl"},{line,110}]},{ejabberd_router,route,3,[{file,"src/ejabberd_router.erl"},{line,87}]},{ejabberd_c2s,check_privacy_route,5,[{file,"src/ejabberd_c2s.erl"},{line,1886}]}]}

Please let me know where I'm going wrong with this.

Thanks

mrDoctorWho commented 7 years ago

Hi,

What ejabberd version are you using?

CreativeWolf commented 7 years ago

Hi,

Using ejabberd-17.01

mrDoctorWho commented 7 years ago

Actually, the module isn't ready yet for the upstream changes. As far as I know, the API was changed after 16.09, so the module won't work with any version newer than that.

CreativeWolf commented 7 years ago

Dang! Any alternatives you can recommend please?

mrDoctorWho commented 7 years ago

Check out royneary's mod_push: https://github.com/royneary/mod_push/

But from the last update I can't tell whether it works with newer versions or not.

CreativeWolf commented 7 years ago

Thanks much, will check it out, else will downgrade ejabberd to 16.09 and wait for an update :)

rk28286 commented 7 years ago

@CreativeWolf did you get any solution ?

rk28286 commented 7 years ago

@mrDoctorWho will it work on 16.12.2 ?

mrDoctorWho commented 7 years ago

No, it won't work after 16.09

BesatZardosht commented 7 years ago

If you can explain a little bit about the issue, I may be able to help with this one.

mrDoctorWho commented 7 years ago

@BesatZardosht, For what I know, there were breaking changes, such as dropping fxml and iq/presence/message records. Now there's a common stanza record. I can be wrong, I still didn't take a look at it.

I see you're really interested in mod_apns. It's nice to have someone who's really watching the project.

BesatZardosht commented 7 years ago

Thanks for the info! I will see what I can do..

I really am interested in the module and it will be very unfortunate if it won't work with latest ejabberd, since not upgrading ejabberd is just a temporary option :)

mrDoctorWho commented 6 years ago

Much thanks to @zinid, the issue resolved now.