Ignore:
Timestamp:
2015-12-16T15:35:04Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
ea39049
Parents:
3a620ff
git-author:
dequis <dx@…> (23-11-15 22:09:39)
git-committer:
dequis <dx@…> (16-12-15 15:35:04)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/message.c

    r3a620ff rd11ccbf  
    2727{
    2828        struct im_connection *ic = data;
     29        struct jabber_data *jd = ic->proto_data;
    2930        char *from = xt_find_attr(node, carbons_sent ? "to" : "from");
    3031        char *type = xt_find_attr(node, "type");
     
    3738        if (!from) {
    3839                return XT_HANDLED; /* Consider this packet corrupted. */
     40        }
     41
     42        /* try to detect hipchat's own version of self-messages */
     43        if (jd->flags & JFLAG_HIPCHAT) {
     44                struct xt_node *c;
     45
     46                if ((c = xt_find_node_by_attr(node->children, "delay", "xmlns", XMLNS_DELAY)) &&
     47                    (s = xt_find_attr(c, "from_jid")) &&
     48                    jabber_compare_jid(s, jd->me)) {
     49                        carbons_sent = TRUE;
     50                }
    3951        }
    4052
Note: See TracChangeset for help on using the changeset viewer.