On 03.03.2015 16:16, Mickaël Rémond wrote:
Hello,
On 3 Mar 2015,[email protected] wrote:
Then the client app hands this information over to its xmpp
server using the enable-iq stanza so the xmpp server can publish push
notifications when the client app is not reachable.
What does it mean ?
Suppose I am using MyApp on iPad and iPhone, with the same JID and
resource (not using them at the same time).
What does not being reachable mean ?
You are right, the draft does not define any events when push
notifications should be sent. The old version didn't either but it
defined three cases to consider when such an event occurs: [1].
I don't think there needs to be a list of unreachable clients, the
server knows when a client is not reachable:
In my (currently broken) ejabberd implementation I chose to send
notifications in the following cases:
- Stream management stores a stanza for a push-enabled user
- mod_offline stores a message for a push-enabled user
This has quite complicated implications, because message delivery rules
(https://tools.ietf.org/html/rfc6121#section-8.5.4) are quite
complicated. First try to write them down:
One or multiple push notifications are published if
- a message addressed to a full jid arrives AND the user has push
enabled for this full jid AND a session with this full jid is in stream
management's zombie state
- a message addressed to a full jid arrives AND there's no non-negative
resource for that jid AND a push-enabled jid has a session with the
highest priority AND this session is in stream management's zombie state
- a message arrives addressed to a bare jid arrives AND the highest
priority session is for a push-enabled jid AND this session is in stream
management's zombie state
- a message addressed to full or bare jid arrives AND there's no
non-negative resource AND there's one (or multiple) push-enabled jids
This is probably incomplete and can be written in a better form. The
question is, do we want to define these events in the XEP or leave it up
to the server when to send a push notification? I have to think more
about this.
Yes, but the list need to be managed. Supposed I had two devices and now
handed over one to someone else. I need to be able to get the list of
devices that serve a reference for XMPP server to trigger push
notifications sending. And as a user, I need to be able to manually
clean that list in some rare but important cases.
Does it make sense ?
I'm not sure if I understand this. If you registered at the app server
with resource A and enabled push at your XMPP server for A, you can
unregister and disable later for A on another device. But maybe I got
you wrong. What case are you thinking of?
Christian
[1]
https://github.com/legastero/customxeps/blob/gh-pages/extensions/push.md#where-to-deliver-notifications