I am using ejabberd-18.09. According to the documentation I think that a temporary room should get deleted once every member of the room leaves the room.
But in our I can see on ejabberd dashboard that rooms created even a month ago are still present on the server.
I can see this on the ejabberd dashboard
JabberID -> [email protected]
participants -> 0
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> true
and there are hundereds of rooms with similar info.
My room configuration is like this
host: "conference.@HOST@"
access:
- allow
access_admin:
- allow: admin
access_create: all
access_persistent: muc_create
default_room_options:
allow_change_subj: false
allow_query_users: true
allow_private_messages: true
members_by_default: true
anonymous: true
max_users: 10
I am a bit lost here. Why is it happening ?
Can anyone help me out here please ?
EDIT
I am using mod_muc:create_room/5 to create the room. Then I send direct Invitation to other users from the ejabberd to other users, which they accept and then join the chat room.
For destroying the rooms the client send destroy
packet to destroy the chat in regular scenario, but if our client fails to send the destroy packet after a certain time of room creation(for different reasons like app being in background, a phone call etc etc) they just leave the room and in such cases I was hoping that the transient rooms would play their part where they get destroyed after everyone leaves.
The are the logs in the ejabberd.log file
<0.23497.0>@mod_muc_room:init:137 Created MUC room [email protected] by [email protected]/xiaomi
<0.23476.0>@ejabberd_c2s:process_terminated:262 (tcp|<0.23476.0>) Closing c2s session for [email protected]/xiaomi: Stream reset by peer
2019-08-26 17:15:13.201 [info] <0.23497.0>@mod_muc_room:close_room_if_temporary_and_empty:1120 Destroyed MUC room [email protected] because it's temporary and empty
2019-08-26 17:15:13.201 [info] <0.23497.0>@mod_muc_room:terminate:703 Stopping MUC room [email protected]
In the ejabberd dashboard there are some rooms with values
JabberID -> [email protected]
participants -> 0
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> true
While there are some as
JabberID -> [email protected]
participants -> 1
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> false
mostly the pattern is that the rooms with 0 ocupants have Justcreated as true
while the once with 1 participant left has Justcreated as false
.