Posted by aaron on March 23, 2010 at 6:17pm
So I created a ticket in the DXMPP queue that I'm hoping to get some eyes on.
Basically, DXMPP registers users from the web server, and uses User Relationships to track a user's roster. Then on a user's page load, it sets a flag in Drupal.settings to add the users to their roster and subscribe via XMPP. After this is done, an AJAX call goes back to Drupal to keep things synchronized. Same on unsubscribe.
The roster stuff works fine. However, subscriptions don't seem to work. We're using the Strophe library to handle communication between the client and XMPP.
Here's the relevant (apparently) non-functional code:
var iq = $iq({jid: Drupal.settings.dxmpp.roster[user].jid}).c('set', {xmlns: 'jabber:iq:roster'});
dxmppConnection.sendIQ(iq);
dxmppConnection.send($pres({
to: Drupal.settings.dxmpp.roster[user].jid,
'type': 'subscribe'
}));
dxmppConnection.send($pres({
to: Drupal.settings.dxmpp.roster[user].jid,
'type': 'subscribed'
}));Any ideas?
Thanks,
Aaron

Comments
Oddly, it appears that
Oddly, it appears that unsubscribing before subscribing fixes the issue. Perhaps the XMPP server gets stuck in a tizzy somewhere along the line...
Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic