[ejabberd] mod_ctrlextra, shared roster groups and more pubsub fun...

Badlop badlop at gmail.com
Tue Feb 17 01:47:49 MSK 2009


2009/2/16 Martin Langhoff <martin.langhoff at gmail.com>:
> When you say this works, if you have 2 client connections _before you
> start those 3 steps_ both see the 'group1' creation, and eachother as
> soon as the 3 steps are completed? Without reconnecting?

Yes, it works immediately.

I have tried again, using ejabberd 2.0.3 + mod_ctlextra, and I get
again my good results:
1. create accounts user1 and user2
2. login to both accounts. they get empty rosters, as there isn't any
SRG yet, and the accounts were just created
3. ejabberdctl srg-create group1 localhost g1name g1desc group1
4. ejabberdctl srg-user-add user1 localhost group1 localhost
5. ejabberdctl srg-user-add user2 localhost group1 localhost
6. Immediately after 5., both users get the other user as contact, and
their presences.

For instance, user1 gets those two stanzas:

<iq from='user1 at localhost/Tka'
	id='push'
	type='set'
	to='user1 at localhost/Tka'>
  <query xmlns='jabber:iq:roster'>
    <item subscription='both'
	jid='user2 at localhost'>
      <group>g1name</group>
    </item>
  </query>
</iq>

<presence from='user2 at localhost/Tka'
	xml:lang='es'
	to='user1 at localhost/Tka'>
  <show>dnd</show>
  <priority>8</priority>
  <status>going</status>
</presence>

And user2 receives something similar:

<iq from='user2 at localhost/Tka'
	id='push'
	type='set'
	to='user2 at localhost/Tka'>
  <query xmlns='jabber:iq:roster'>
    <item subscription='both'
	jid='user1 at localhost'>
      <group>g1name</group>
    </item>
  </query>
</iq>

<presence from='user1 at localhost/Tka'
	xml:lang='es'
	to='user2 at localhost/Tka'>
  <priority>8</priority>
  <status>going</status>
</presence>


> (Here, "it works" in the sense that if I connect _afterwards_ I see
> presence/pubsub working right. But it doesn't work "immediately" if
> I'm connected...)

What you describe indicate you are using ejabberd 2.0.2 or older.
This was fixed in ejabberd 2.0.3:
https://support.process-one.net/browse/EJAB-767

I have tried ejabberd 2.0.2, and it behaves as you describe (which is
also described in EJAB-767).

Note that I didn't try pubsub stuff, I only check roster and presence
as shown in the two desktop clients, and in their Raw XML windows.


---
Badlop,
ProcessOne


More information about the ejabberd mailing list