nioc / xmpp-web

Lightweight web chat client for XMPP server
GNU Affero General Public License v3.0
142 stars 20 forks source link

JID does not change with anonymous access #42

Closed freize closed 2 years ago

freize commented 2 years ago

Hello. Help me please. Maybe I'm doing something wrong, I did not find a guide on this issue. If several people enter at the same time through an anonymous login, then the one who entered later throws out the one who entered earlier from the conference. JID remains the same. Can this be fixed somehow?

nioc commented 2 years ago

Hello @freize it is an XMPP settings, I just tested the 2 following scenarios with Prosody 0.11.7 as XMPP server:

You should see an XML response from XMPP server containing a conflict error (which is handled by stanza and this app), like this:

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="jabber:client" type="error" to="zcjafhkdavpgytpa@anon.localhost/Web XMPP" from="welcome@conference.localhost/bob" id="7354b5ae-797f-4e3a-b827-ed25e645b0b2">
   <error code="409" type="cancel">
      <conflict xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
   </error>
   <x xmlns="http://jabber.org/protocol/muc" />
</presence>

I can not help you as it is an XMPP configuration issue. Here is a MUC declaration example in prosody.cfg:

Component "conference.domain-xmpp.ltd" "muc"
    modules_enabled = {
        "muc_mam";
        "vcard_muc";
    }
    name = "Conferences server"
    restrict_room_creation = "local"
    max_history_messages = 50