【发布时间】:2019-12-30 02:44:55
【问题描述】:
我正在使用 ejabberd-18.09。根据文档,我认为一旦房间的每个成员离开房间,临时房间就应该被删除。
但在我们的 ejabberd 仪表板上,我可以看到甚至一个月前创建的房间仍然存在于服务器上。
我可以在 ejabberd 仪表板上看到这个
JabberID -> myroom@conference.example.com
participants -> 0
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> true
并且有数百个房间有类似的信息。
我的房间配置是这样的
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
我有点迷路了。为什么会这样?
谁能帮帮我吗?
编辑
我正在使用 mod_muc:create_room/5 创建房间。然后我从 ejabberd 直接向其他用户发送邀请,其他用户接受邀请,然后加入聊天室。
为了销毁房间,客户端发送destroy包来销毁聊天在常规场景中,但是如果我们的客户端在房间创建一段时间后未能发送销毁包(由于应用程序在后台等不同原因,a电话等)他们只是离开房间,在这种情况下,我希望临时房间能发挥作用,在每个人离开后它们被摧毁。
是 ejabberd.log 文件中的日志
<0.23497.0>@mod_muc_room:init:137 Created MUC room myroom@conference.example.com by user1@example.com/xiaomi
<0.23476.0>@ejabberd_c2s:process_terminated:262 (tcp|<0.23476.0>) Closing c2s session for user1@example.com/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 myroom@conference.example.com 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 myroom@conference.example.com
在 ejabberd 仪表板中有一些带有值的房间
JabberID -> myroom1@conference.example.com
participants -> 0
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> true
虽然有一些像
JabberID -> myroom2@conference.example.com
participants -> 1
Last message -> A long time ago
Public -> true
Persistent -> false
Logging -> false
Justcreated -> false
大多数情况下,有 0 人的房间有Justcreated as true,而有 1 人的房间有Justcreated as false。
【问题讨论】: