Expose Multiple Resources

Martin Atkins mart at degeneration.co.uk
Tue Jul 24 18:52:54 UTC 2007

Peter Saint-Andre wrote:
> Jason Salaz wrote:
>> On 7/24/07, Martin Atkins <mart at degeneration.co.uk> wrote:
>>> Jason Salaz wrote:
>>>  > I would imagine that the problem is that the server doesn't allow
>>>  > presence to<->from oneself, or something like that that.
>>> Do you know how this is supposed to work at the protocol level? If
>>> you're not sure then I'll try to figure it out myself, of course. :)
>> I'm not entirely sure.  I'm looking through rfc3920, but that's
>> intermingled with tending to my day job as well, so I may not get to
>> the bulk of it until tonight.
>> What I do know is that I don't have any subscription to myself. i.e.
>> My JID isn't on my own roster as a subscription.  Yet, GTalk still
>> passes my own presence from another resource along whenever I sign on.
> This is a feature of the protocol. It is best explained here:
> http://www.xmpp.org/internet-drafts/draft-saintandre-rfc3921bis-03.html#presence-initial-outbound
> Please refer to rfc3920bis and rfc3921bis for the most up-to-date
> descriptions of the protocol.

I have coded up a fix. The change is that whenever the server does a 
presence broadcast to everyone on the roster it also sends the same 
presence stanza to all of the user's other resources.

This seems to satisfy what the spec says, and makes Psi show the "Send 
Message To" menu item for the other resources.

However, this has caused DJabberd to no longer pass the "two-resources" 
tests. I'll be checking the fix in once I've figured out why the tests 
are now failing.

More information about the Djabberd mailing list