Project

General

Profile

Message Delivery Receipts ( XEP-0184 ) is not working for offline users

Ehsan Mozaffari
Added about 3 years ago

Hi

I am trying to implement xep-0184 and I followed the instructions described in this xep using a PSI xml console.

The server works fine for online users, but, for offline users there is below scenario:

1) USER A is online and USER B is offline.

2) USER B becomes offline, USER A sends a message to USER B like bellow stanza:

<message
    from='northumberland@shakespeare.lit/westminster'
    id='richard2-4.1.247'
    to='kingrichard@royalty.england.lit/throne'>
  <body>My lord, dispatch; read o'er these articles.</body>
  <request xmlns='urn:xmpp:receipts'/>
</message>

3) As USER B had been offline, the message is stored to DATABASE.

4) USER A becomes offline too.

5) USER B becomes online again, and receives the offline message from DATABASE.

6) According to XEP I send the below stanza from the PSI xml console to USER A:

<message
    from='kingrichard@royalty.england.lit/throne'
    id='bi29sg183b4v'
    to='northumberland@shakespeare.lit/westminster'>
  <received xmlns='urn:xmpp:receipts' id='richard2-4.1.247'/>
</message>

7) USER A becomes online again.

8) According to the XEP the USER A is supposed to receive the same stanza (the above step 6).

But unfortunately, User A does not receive the message. In other words, the acknowledge message does not store as offline message.

Do you know why the acknowledge offline message in this scenario is not delivered?

Thank you in advance for your time.

init.properties.txt (2.11 KB) init.properties.txt Here is my init.properties on tigase-b3821

Replies (1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam about 3 years ago

By default Tigase XMPP Server stores only messages containing <body/> element or <event/> element or <header/> element.

In your case, in confirmation of delivery there is no <body/> or <event/> or <header/> element so it is no stored.

I created new task #3671 to look into this and maybe change default behavior to store this messages as well.

For now I can suggest you to look into task #2426 in which it is described how to configure Tigase XMPP Server to store messages to offline user also in other cases, but this feature is part of Tigase XMPP 7.1.0-SNAPSHOT, so it is not available in version which you use.

    (1-1/1)