0

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?

  • I'm not really sure what you're asking; do you mean that they join with two different nicknames and you want the server to "merge" them into a single entry in the chat roster, or is this one person showing up twice even though they appear to have the same nickname (it's just being listed twice)? – Sam Whited Dec 10 '16 at 00:24
  • Actually currently I have both cases, one user appears twice with exactly the same nickname and one appears twice where the nicknames have a different casing ("User" and "user"). All other appear only once, no matter how much devices are connected. I consider this the right behaviour and would expect that every user appears only once. I wonder why this happens and if I can do anything about it. I already tried to change the muc from anonymous to non-anonymous but it doesn't make a difference. – Björn Schießle Dec 10 '16 at 00:28

1 Answers1

2

The 'multi-session nick' feature in Prosody works such that if multiple devices (XMPP resources) using the same XMPP account (bare JID) try to use the same nickname in a room, the merging occurs (i.e., that nick is backed by multiple account-sessions). I'm one of the Prosody authors, and the author of this functionality.

The problem you are describing is because the multiple devices for these users are NOT using the same nickname (as Sam Whited's comment suggests) or they are using separate XMPP accounts. Nicknames are always unique in a room, and the same one cannot appear twice by definition.

Nicknames are case sensitive ("User" is different from "user"), and the user who has the exact same nickname appearing twice likely still has some small difference (e.g., they may have added a space at the end of the nickname, or they may be using unicode characters that look very similar, but are different).

The easiest solution is to ask these users to change their nickname to be the same. The alternative solution would be to write a Prosody plugin to enforce a nickname policy (assuming you are the server admin).

waqas
  • 10,323
  • 2
  • 20
  • 11