I am implementing chat app and I can't understand why when I use modulue Send_message of ejabberd the receiver does not see the message.
I mean :
User B is offline and user A send a message using ejabberd api through https. **
when user B gets online he sees nothing ***
I am using smack in client side and I implemented the listener for incoming messages. but I see no incoming packet with Message extension
I cannot reproduce that problem.
This is how I tested it:
Install ejabberd 21.04, default configuration, start it
register accounts user1@localhost and user2@localhost
Send message using the shell (no need to setup API):
❯ ejabberdctl send_message chat user1@localhost user2@localhost somesubject somebody
Then login to account user2@localhost using a good desktop Jabber client, for example Gajim, Psi, Tkabber, ... After logging in, the client receives
<message to='user2@localhost'
from='user1@localhost'
type='chat'
id='13012384106679348680'>
<archived by='user2@localhost'
id='1621974627878891'
xmlns='urn:xmpp:mam:tmp'/>
<stanza-id by='user2@localhost'
id='1621974627878891'
xmlns='urn:xmpp:sid:0'/>
<delay from='localhost'
stamp='2021-05-25T20:30:27.879994Z'
xmlns='urn:xmpp:delay'>Offline storage</delay>
<body>somebody</body>
<subject>somesubject</subject>
</message>
Things you must try: