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?
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).