Search code examples
xmppejabberd

Offline message delivery policy to multiple receiving device ejabberd


Alice from Device A sends 10 messages to Bob who has devices B and C (Both Offline).

The sent 10 messages to stay in the offline message queue.

As per, xep-0160, the first device (suppose B) that sends a positive presence gets the offline message delivered and then removed.

How the other device C will get the messages delivered to it then?

There is MAM or another pull-based mechanism for fetching from clients.

But is this intended by design or any config available that will keep offline messages until it gets delivered to all or number of the latest N device?


Solution

  • How the other device C will get the messages delivered to it then?

    XEP-0160 doesn't care about multiple devices. As you noticed, once it sends the offline messages to a client, that's all for it.

    But is this intended by design or any config available that will keep offline messages until it gets delivered to all or number of the latest N device?

    That makes little sense: how would the server determine that YOU, Alice, only plan to have 2 devices, and Bob "plans" to have three?

    That problem is already solved: XEP-0160 delivers the offline messages automatically to the first session that logins with possitive presence. MAM stores those messages in the account MAM archive. Whenever (if ever at all) any other session logins to that account, that client can request the recent MAM archive to know the recently delivered messages.