Closed cesar-cardinale closed 2 years ago
It works for me using ejabberd 21.12 and 22.05 compile from source code. I'll describe how I tested it, maybe it gives you some hint, you can compare with your method, or you can try this method to see if there's some goblin tricking you:
--- a/ejabberd.yml.example
+++ b/ejabberd.yml.example
@@ -16,6 +16,7 @@
hosts:
- localhost
+ - shakespeare.example
loglevel: info
@@ -185,6 +186,8 @@ modules:
default: always
mod_mqtt: {}
mod_muc:
+ hosts:
+ - muc.@HOST@
access:
- allow
access_admin:
@@ -194,7 +197,9 @@ modules:
access_mam:
- allow
default_room_options:
+ allow_subscription: true
mam: true
+ persistent: true
mod_muc_admin: {}
mod_offline:
access_max_user_messages: max_user_offline_messages
Then I register accounts hag66@shakespeare.example and bubu@shakespeare.example
The first account joins the room coven
, so that it gets created.
First account subscribes:
<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:affiliations' />
<event node='urn:xmpp:mucsub:nodes:config' />
<event node='urn:xmpp:mucsub:nodes:messages' />
<event node='urn:xmpp:mucsub:nodes:presence' />
<event node='urn:xmpp:mucsub:nodes:subject' />
<event node='urn:xmpp:mucsub:nodes:subscribers' />
<event node='urn:xmpp:mucsub:nodes:system' />
</subscribe>
</iq>
<message to='hag66@shakespeare.example'
from='coven@muc.shakespeare.example'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='urn:xmpp:mucsub:nodes:subscribers'>
<item id='1371773332584390325'>
<subscribe jid='hag66@shakespeare.example'
nick='mynick'
xmlns='urn:xmpp:mucsub:0'/>
</item>
</items>
</event>
</message>
<iq xml:lang='es'
to='hag66@shakespeare.example/tka1'
from='coven@muc.shakespeare.example'
type='result'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe nick='mynick'
xmlns='urn:xmpp:mucsub:0'>
<event node='urn:xmpp:mucsub:nodes:affiliations'/>
<event node='urn:xmpp:mucsub:nodes:config'/>
<event node='urn:xmpp:mucsub:nodes:messages'/>
<event node='urn:xmpp:mucsub:nodes:presence'/>
<event node='urn:xmpp:mucsub:nodes:subject'/>
<event node='urn:xmpp:mucsub:nodes:subscribers'/>
</subscribe>
</iq>
<iq
to='coven@muc.shakespeare.example'
type='set'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe xmlns='urn:xmpp:mucsub:0'
nick='mynick2'
password='roompassword'>
<event node='urn:xmpp:mucsub:nodes:affiliations' />
<event node='urn:xmpp:mucsub:nodes:config' />
<event node='urn:xmpp:mucsub:nodes:messages' />
<event node='urn:xmpp:mucsub:nodes:presence' />
<event node='urn:xmpp:mucsub:nodes:subject' />
<event node='urn:xmpp:mucsub:nodes:subscribers' />
<event node='urn:xmpp:mucsub:nodes:system' />
</subscribe>
</iq>
<message to='bubu@shakespeare.example'
from='coven@muc.shakespeare.example'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='urn:xmpp:mucsub:nodes:subscribers'>
<item id='6932409545634587930'>
<subscribe nick='mynick2'
xmlns='urn:xmpp:mucsub:0'/>
</item>
</items>
</event>
</message>
<iq xml:lang='es'
to='bubu@shakespeare.example/tka1'
from='coven@muc.shakespeare.example'
type='result'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe nick='mynick2'
xmlns='urn:xmpp:mucsub:0'>
<event node='urn:xmpp:mucsub:nodes:affiliations'/>
<event node='urn:xmpp:mucsub:nodes:config'/>
<event node='urn:xmpp:mucsub:nodes:messages'/>
<event node='urn:xmpp:mucsub:nodes:presence'/>
<event node='urn:xmpp:mucsub:nodes:subject'/>
<event node='urn:xmpp:mucsub:nodes:subscribers'/>
</subscribe>
</iq>
<message to='hag66@shakespeare.example'
from='coven@muc.shakespeare.example'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='urn:xmpp:mucsub:nodes:subscribers'>
<item id='5455431537046146575'>
<subscribe jid='bubu@shakespeare.example'
nick='mynick2'
xmlns='urn:xmpp:mucsub:0'/>
</item>
</items>
</event>
</message>
Hello, I followed what you said but unfortunately nothing change. I get my subscription response but others user doesn't get mine.
This is really annoying ... I don't even know where the problem comes from !
Ok, now I tried to do exactly like you say that you do it, with some changes compared to my previous step-by-step guide:
Get ejabberd 21.12 from docker:
docker run --name ejabberd -d -p 5222:5222 ejabberd/ecs:21.12
To edit the configuration I use:
docker exec ejabberd vi /home/ejabberd/conf/ejabberd.yml
Then I reload the configuration and register the accounts:
docker exec -it ejabberd bin/ejabberdctl reload_config
docker exec -it ejabberd bin/ejabberdctl register hag66 shakespeare.example localhost
docker exec -it ejabberd bin/ejabberdctl register bubu shakespeare.example localhost
I use Tkabber client to login to the accounts, which has a XML console to put and read the XMPP stanzas. You can also use Gajim, Psi... I don't need to join the room or create it in any way: the room gets created when the first user subscribes to it.
... The remaining steps are identical. And it works correctly!
Quite obviously, you are doing something different than me. Repeat those steps carefully.
Environment
Configuration
Bug description
A user (A) subscribe to a MUC Room, with all events :
urn:xmpp:mucsub:nodes:subscribers
,urn:xmpp:mucsub:nodes:presence
, ... . Another user (B) subscribe to this same MUC Room, the (A) user does not receive the subscription from the user (B).But in the documentation of ejabberd, it said that if you subscribe to this node you will receive the new subscriptions and also the unsubscriptions from other. But I receive all other type of message like presence message etc ...
Did I made something wrong ?
Thank you.