diff options
author | dequis <dx@dxzone.com.ar> | 2015-11-23 19:09:39 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-12-16 12:35:04 -0300 |
commit | d11ccbf6ea94264bde8b0f525c4bbedf50de0174 (patch) | |
tree | 117472f5c00f83d1075bdab41fb1ef2c753544a1 /protocols/jabber/presence.c | |
parent | 3a620ff93afb90f1b9114bab0faad65cad5dd80e (diff) |
hipchat: Implement their own variant of self-messages (not working yet)
Reuses part of the carbons code, but it's not like it at all.
To be able to receive these messages at all, a different cap node
whitelisted by them is required. I could have used one of the official
clients, but let's try to get things done the right way.
This will start working once they make that change in their servers,
right now this is still in their ticket backlog. I'm merging this now
because it's harmless and nice to have as part of the upcoming release.
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r-- | protocols/jabber/presence.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 14060148..6ee9ff0a 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -221,7 +221,13 @@ int presence_send_update(struct im_connection *ic) Trillian seem to do this right. */ cap = xt_new_node("c", NULL, NULL); xt_add_attr(cap, "xmlns", XMLNS_CAPS); - xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps"); + + if (jd->flags & JFLAG_HIPCHAT) { + /* hipchat specific node, whitelisted by request to receive self-messages */ + xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps/hipchat"); + } else { + xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps"); + } xt_add_attr(cap, "ver", BITLBEE_VERSION); /* The XEP wants this hashed, but nobody's doing that. */ xt_add_child(node, cap); |