ejabberd MucSub not working

I'm working on developing an XMPP Client communicating over an ejabberd community server (version 17.09) that we host ourselves.

I'm having trouble to implement the MucSub Feature (supported since version 16.08 as far as I know).

When I'm sending this XML command (described in the ejabberd documentation for subscribing to a chatroom):

<iq from='hag66@shakespeare.example'
to='coven@muc.shakespeare.example'
type='set'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  <subscribe xmlns='urn:xmpp:mucsub:0'
             nick='mynick'
             password='roompassword'>
    <event node='urn:xmpp:mucsub:nodes:messages' />
    <event node='urn:xmpp:mucsub:nodes:affiliations' />
    <event node='urn:xmpp:mucsub:nodes:subject' />
    <event node='urn:xmpp:mucsub:nodes:config' />
  </subscribe>
</iq>

(of course entering existing jid's for this server, allow_subscription set to true for this chatroom) I get the result:

<iq xml:lang='de'
to='hag66@shakespeare.example'
from='coven@muc.shakespeare.example'
type='error' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe xmlns='urn:xmpp:mucsub:0' nick='mynick'>
    <event node='urn:xmpp:mucsub:nodes:messages'/>
    <event node='urn:xmpp:mucsub:nodes:affiliations'/>
    <event node='urn:xmpp:mucsub:nodes:subject'/>
    <event node='urn:xmpp:mucsub:nodes:config'/>
  </subscribe>
<error code='503' type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xml:lang='de' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>No module is handling this query</text>
</error>
</iq>

When I alter the query to:

<iq from='hag66@shakespeare.example'
to='coven@muc.shakespeare.example'
type='set'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  <subscribe xmlns='urn:xmpp:mucsub:0'
             nick='mynick'
             password='roompassword'>
    <event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:messages" />
    <event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:affiliations' />
    <event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:subject' />
    <event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:config' />
  </subscribe>
</iq>

I get the result:

<iq xmlns="jabber:client"
to="hag66@shakespeare.example"
xml:lang="en"
type="result"
from="coven@muc.shakespeare.example"
id="agsXMPP_8">
   <subscribe xmlns="urn:xmpp:mucsub:0" nick="mynick" />
</iq>

which I interpret as the query being successfull. Also when I query the Chatrooms this user is subscribed to the chatroom is listed.

My Problem now is: no matter which of this methods I use, the user does not get notifications for messages in that chat if he is not present in exactly this chatroom.

Now the strangest thing is: if I get DiscoInfo from the server the MucSub Feature (urn:xmpp:mucsub:0) is not listed, which I don't understand as the Feature is supported by the server version I'm using and according to the documentation is enabled by default and can't even be disabled.

Has anyone experienced the same issue and/or knows how to resolve it?

Thanks in advance for your help

> the Feature is supported by

> the Feature is supported by the server version I'm using and according to the documentation is enabled by default and can't even be disabled.

The feature is enabled at the MUC service. This allows any room owner to enable it for the room when he wants. By default, it is disabled for the rooms. So, join your room, configure it, and enable "Allow subscriptions".

Thank you for your reply but

Thank you for your reply but the thing is we already added "allow_subscription: true" to the "default_room_options" in our config file.

I guess you configured like

I guess you configured like this, right?

modules:
  mod_muc:
    default_room_options:
      allow_subscription: true

Now create a NEW room with a client, configure it. Is the "Allow subscriptions" enabled or disabled?

Yes we configured it like

Yes we configured it like this and also tried it again with a new chatroom and "Allow subscription" is enabled.

> Now the strangest thing is:

> Now the strangest thing is: if I get DiscoInfo from the server the MucSub Feature (urn:xmpp:mucsub:0) is not listed, which I don't understand as the Feature is supported by the server version I'm using and according to the documentation is enabled by default and can't even be disabled.

The feature is announced in DiscoInfo of the MUC service, not the XMPP server.

Syndicate content