Users with same JID appears twice in the multi-user chat if they connect with multiple devices

时间:2016-12-09 12:51:32

标签: xmpp multiuserchat prosody-im

I run a XMPP server with Prosody. Some user appear twice if they connect with two clients (e.g. Conversations and Gajim) and join a multi user chat. This is really irritating, for example depending which username you mention the notification will appear on their desktop- or mobile-device only.

I can't reproduce this behavior. Even if I join the chat with two devices, I only appear as one person. I think this is the right behavior. Is there anything I can do to prevent that people appear multiple times?

1 个答案:

答案 0 :(得分:2)

'多会话缺口' Prosody中的功能使得如果使用相同XMPP帐户(裸JID)的多个设备(XMPP资源)尝试在房间中使用相同的昵称,则发生合并(即,该缺口由多个帐户会话支持)。我是Prosody的一位作者,也是这个功能的作者。

您所描述的问题是因为这些用户的多个设备没有使用相同的昵称(如Sam Whited的评论所示),或者他们使用的是单独的XMPP帐户。昵称在房间中总是独一无二的,根据定义,昵称不能出现两次。

昵称区分大小写("用户"与"用户"不同),并且具有完全相同的昵称出现两次的用户可能仍然存在一些小的差异(例如,他们可能在昵称的末尾添加了一个空格,或者他们可能正在使用看起来非常相似但不同的unicode字符。

最简单的解决方案是让这些用户将其昵称更改为相同。另一种解决方案是编写一个Prosody插件来强制执行昵称策略(假设您是服务器管理员)。

相关问题