0
votes

We're using IOS XMPP Framework and Android Smack Library to connect our ejabberd server in our mobile application. Both of them has the similar problem.

When we create the room as admin, we add users to member list by sending ejabberd

<item affiliation='member' jid='[email protected]'>

Then users can send and receive messages to group without any problem. And if a user removes the app from device and reinstall it, we are using muc discovery protocol to discover which rooms he/she were joined before he/she uninstall the app

However there is a problem at this point, If a user uses the muc discovery when all the participants of the group became offline. Server doesn't return muc discovery result about that group to user as he/she is a participant of it.

And when I check the admin console those groups seems to have 0 participants(Because all the participants are offline, but they are in the memberlist). And I think muc discovery returns only the groups which have more than 0 participants

Does anyone know why does it happen and how can I find a solution to that? @badlop

We're using ejabberd 16.09

1

1 Answers

0
votes

Muc says if user goes offline then he should left all his group, that is why you are not getting group participant when users goes offline. See here http://xmpp.org/extensions/xep-0045.html

Instead of using muc use muc-light https://xmpp.org/extensions/inbox/muc-light.html

It will help you resolve issue and its very easy to implement.