ejabberd development
  1. ejabberd development
  2. EJAB-305

Allow multiple entry with same nick to MUC rooms

    Details

      Description

      XEP-0045, section 7.2.9 http://xmpp.org/extensions/xep-0045.html#enter-conflict

      However, if the bare JID <localpart@domain.tld> of the present occupant matches the bare JID of the user seeking to enter the room, then the service SHOULD allow entry to the user, so that the user has two (or more) in-room "sessions" with the same roomnick, one for each resource. If a service allows more than one occupant with the same bare JID and the same room nickname, it MUST route in-room messages to all of the user's resources and allow all of the user's resources to send messages to the room; it is up to the implementation whether to route private messages to all resources or only one resource (based on presence priority or some other algorithm); however, it is RECOMMENDED to route to all resources.

      Reported problems in the patch and their status:

      • A private message sent from any participant to the nick is only sent to the last joined resource. It should be sent to all the resources.
      • If the last joined resource now leaves the room, then all other resources are kicked of the room. They should be kept alive.
      • The option max_user_conferences only works correctly when the limit is 1. If the limit is 2 or more, then the user can join as many resources as he wants.
      • The option max_users is implemented in such way that it considers the multiple resources as only 1 participant.
      • Update the patch to ejabberd master branch and test it again.
      1. mod_muc_room.erl.patch
        10 kB
        Magnus Henoch
      2. mod_muc_room.erl-svn.patch
        17 kB
        Badlop
      3. mod_muc_room.erl-svn.patch
        11 kB
        Badlop
      4. mod_muc_room.erl-svn.patch
        11 kB
        Badlop
      5. mod_muc_room.erl-svn.patch
        11 kB
        Badlop
      6. mod_muc_room.erl-svn.patch
        10 kB
        Magnus Henoch

        Issue Links

          Activity

          Hide
          Tomasz Kraus
          added a comment -

          Hello, is there any configuration needed after applying and recompiling ejabberd 2.1.8 ??

          When i connect with strophe.js in many tabs with same JID and same resource I get HTTP 404s, and ejabberd log also claims the session is getting replaced:

          {{{
          =INFO REPORT==== 17-Aug-2011::10:27:45 ===
          I(<0.475.0>:ejabberd_c2s:767) : ({socket_state,ejabberd_http_bind,{http_bind,<0.474.0>,127,0,0,1},46922,ejabberd_http_bind}) Accepted authentication for Balrog by ejabberd_auth_anonymous

          =INFO REPORT==== 17-Aug-2011::10:27:46 ===
          I(<0.475.0>:ejabberd_c2s:890) : ({socket_state,ejabberd_http_bind,{http_bind,<0.474.0>,127,0,0,1},46922,ejabberd_http_bind}) Opened session for Balrog@hmwrk.lh/pm

          =INFO REPORT==== 17-Aug-2011::10:27:46 ===
          I(<0.472.0>:ejabberd_c2s:1435) : ({socket_state,ejabberd_http_bind,{http_bind,<0.471.0>,127,0,0,1},46872,ejabberd_http_bind}) Replaced session for Balrog@hmwrk.lh/pm
          }}}

          Show
          Tomasz Kraus
          added a comment - Hello, is there any configuration needed after applying and recompiling ejabberd 2.1.8 ?? When i connect with strophe.js in many tabs with same JID and same resource I get HTTP 404s, and ejabberd log also claims the session is getting replaced: {{{ =INFO REPORT==== 17-Aug-2011::10:27:45 === I(<0.475.0>:ejabberd_c2s:767) : ({socket_state,ejabberd_http_bind,{http_bind,<0.474.0>, 127,0,0,1},46922 ,ejabberd_http_bind}) Accepted authentication for Balrog by ejabberd_auth_anonymous =INFO REPORT==== 17-Aug-2011::10:27:46 === I(<0.475.0>:ejabberd_c2s:890) : ({socket_state,ejabberd_http_bind,{http_bind,<0.474.0>, 127,0,0,1},46922 ,ejabberd_http_bind}) Opened session for Balrog@hmwrk.lh/pm =INFO REPORT==== 17-Aug-2011::10:27:46 === I(<0.472.0>:ejabberd_c2s:1435) : ({socket_state,ejabberd_http_bind,{http_bind,<0.471.0>, 127,0,0,1},46872 ,ejabberd_http_bind}) Replaced session for Balrog@hmwrk.lh/pm }}}
          Hide
          Badlop
          added a comment -

          Tomasz Kraus: this ticket is about MUC nick conflict. If you refer to XMPP resource conflict, see New option resource_conflict to define server action.

          Show
          Badlop
          added a comment - Tomasz Kraus: this ticket is about MUC nick conflict. If you refer to XMPP resource conflict, see New option resource_conflict to define server action .
          Hide
          Badlop
          added a comment -

          I've migrated the patch to ejabberd master, and tested it. I've applied the patch to branches 2.1.x and master.

          Show
          Badlop
          added a comment - I've migrated the patch to ejabberd master, and tested it. I've applied the patch to branches 2.1.x and master.
          Hide
          Vitaly Takmazov
          added a comment -

          Minor inconsistence after applying this patch:
          1) User enter to room with client 1, muc generate presence with "client 1"'s capabilities
          2) User enter to room with client 2, muc generate presence with "client 2"'s capabilities
          3) User leave room from client 2, muc do not generate presence, so we have "client 2" capabilities, but only "client 1" present.

          Possible solution: muc should need to generate presence from "client 1" when client 2 leave room.

          Show
          Vitaly Takmazov
          added a comment - Minor inconsistence after applying this patch: 1) User enter to room with client 1, muc generate presence with "client 1"'s capabilities 2) User enter to room with client 2, muc generate presence with "client 2"'s capabilities 3) User leave room from client 2, muc do not generate presence, so we have "client 2" capabilities, but only "client 1" present. Possible solution: muc should need to generate presence from "client 1" when client 2 leave room.
          Hide
          Badlop
          added a comment -

          Vitaly: this ticket was about improvimg MUC to allow multiple entry with same nick to MUC rooms. ejabberd already implements that. This ticket is closed.

          What you describe is a problem, or a bug. Open a new ticket for that. And provide a patch if you can.

          Show
          Badlop
          added a comment - Vitaly: this ticket was about improvimg MUC to allow multiple entry with same nick to MUC rooms. ejabberd already implements that. This ticket is closed. What you describe is a problem, or a bug. Open a new ticket for that. And provide a patch if you can.

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 32 weeks, 4 days ago

                Issue deployment