Ignore:
Timestamp:
2015-11-23T22:09:39Z (8 years ago)
Author:
dequis <dx@…>
Parents:
ad9ac5d
Message:

hipchat: Implement their own variant of self-messages

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/presence.c

    rad9ac5d r1e2094e  
    222222        cap = xt_new_node("c", NULL, NULL);
    223223        xt_add_attr(cap, "xmlns", XMLNS_CAPS);
    224         xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps");
     224
     225        if (jd->flags & JFLAG_HIPCHAT) {
     226                /* hipchat specific node, whitelisted by request to receive self-messages */
     227                xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps/hipchat");
     228        } else {
     229                xt_add_attr(cap, "node", "http://bitlbee.org/xmpp/caps");
     230        }
    225231        xt_add_attr(cap, "ver", BITLBEE_VERSION);   /* The XEP wants this hashed, but nobody's doing that. */
    226232        xt_add_child(node, cap);
Note: See TracChangeset for help on using the changeset viewer.