processone / processone/ejabberd

Cannot change affiliation for some JIDs in MUC

Open
#4,611 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Erlang
Stars
6.7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

ejabberd version: 26.07

This is a working flow

<iq xmlns="jabber:client" from="miho@movim.eu/Movim.WVMQRA.njmI1AcH-U" to="gnap@conference.movim.eu" type="set" id="FlklGvnYtNRH" xml:lang="en">
    <query xmlns="http://jabber.org/protocol/muc#admin">
        <item affiliation="owner" jid="test@movim.eu"/>
    </query>
</iq>
<iq xml:lang='en' to='miho@movim.eu/Movim.WVMQRA.njmI1AcH-U' from='gnap@conference.movim.eu' type='result' id='FlklGvnYtNRH'/>

<iq xmlns="jabber:client" from="miho@movim.eu/Movim.WVMQRA.njmI1AcH-U" to="gnap@conference.movim.eu" type="get" id="O8O3fZFUb7Oq" xml:lang="en">
    <query xmlns="http://jabber.org/protocol/muc#admin">
        <item affiliation="owner"/>
    </query>
</iq>
<iq xml:lang='en' to='miho@movim.eu/Movim.WVMQRA.njmI1AcH-U' from='gnap@conference.movim.eu' type='result' id='O8O3fZFUb7Oq'>
    <query xmlns='http://jabber.org/protocol/muc#admin'>
        <item jid='edhelas@movim.eu' affiliation='owner'/>
        <item jid='gnap@movim.eu' affiliation='owner'/>
        <item jid='miho@movim.eu' affiliation='owner'/>
        <item jid='test@movim.eu' affiliation='owner'/>
    </query>
</iq>

But for some JIDs it doesn't seems to work.

<iq xmlns="jabber:client" from="miho@movim.eu/Movim.WVMQRA.njmI1AcH-U" to="gnap@conference.movim.eu" type="set" id="5jlNqTFIFmWZ" xml:lang="en">
    <query xmlns="http://jabber.org/protocol/muc#admin">
        <item affiliation="owner" jid="sfu.movim.eu"/>
    </query>
</iq>
<iq xml:lang='en' to='miho@movim.eu/Movim.WVMQRA.njmI1AcH-U' from='gnap@conference.movim.eu' type='result' id='5jlNqTFIFmWZ'/>

<iq xmlns="jabber:client" from="miho@movim.eu/Movim.WVMQRA.njmI1AcH-U" to="gnap@conference.movim.eu" type="get" id="sSX2yF" xml:lang="en">
    <query xmlns="http://jabber.org/protocol/muc#admin">
        <item affiliation="admin"/>
    </query>
</iq>

<iq xml:lang='en' to='miho@movim.eu/Movim.WVMQRA.njmI1AcH-U' from='gnap@conference.movim.eu' type='result' id='sSX2yF'>
    <query xmlns='http://jabber.org/protocol/muc#admin'>
        <item jid='sfu.movim.eu' affiliation='admin'/>
        <item jid='demonstration@movim.eu' affiliation='admin'/>
    </query>
</iq>

The affiliation change doesn't return an error but we see that sfu.movim.eu stays admin there.

The issue only seems to appear for JIDs that are only domains (needed for my SFU service).

Thanks again for all the awesome work !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the MUC admin XML requests shown in the issue, comparing a normal JID with the domain-only JID sfu.movim.eu. Trace the MUC affiliation handling for domain-only JIDs; done means the set request changes the affiliation and a subsequent query reports the new value.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.