Ignore:
Timestamp:
2015-04-28T13:47:48Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
70ec7ab, 9ed8175
Parents:
1493c4b
git-author:
dequis <dx@…> (21-02-15 06:18:21)
git-committer:
dequis <dx@…> (28-04-15 13:47:48)
Message:

hipchat: Basic implementation: Auth, profile and mention names

This is enough to log in with their usernames, make 'chat add' based
groupchat joins slightly more smooth, and see mention names as nicks.

All the MUC list stuff is left out intentionally since that's not as
stable as I wish.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r1493c4b r40cfbc5  
    2727static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
    2828static xt_status jabber_iq_display_vcard(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
    29 static int jabber_iq_disco_server(struct im_connection *ic);
    3029
    3130xt_status jabber_pkt_iq(struct xt_node *node, gpointer data)
     
    374373static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *node, struct xt_node *orig)
    375374{
     375        struct jabber_data *jd = ic->proto_data;
    376376        struct xt_node *query, *c;
    377377        int initial = (orig != NULL);
     
    388388                char *name = xt_find_attr(c, "name");
    389389                char *sub = xt_find_attr(c, "subscription");
     390                char *mention_name = xt_find_attr(c, "mention_name");
    390391
    391392                if (jid && sub) {
     
    396397                                if (name) {
    397398                                        imcb_rename_buddy(ic, jid, name);
     399                                }
     400
     401                                /* This could also be used to set the full name as nick for fb/gtalk,
     402                                 * but i'm keeping the old (ugly?) default behavior just to be safe */
     403                                if (mention_name && (jd->flags & JFLAG_HIPCHAT)) {
     404                                        imcb_buddy_nick_hint(ic, jid, mention_name);
    398405                                }
    399406                        } else if (strcmp(sub, "remove") == 0) {
     
    855862                                                 struct xt_node *node, struct xt_node *orig);
    856863
    857 static int jabber_iq_disco_server(struct im_connection *ic)
     864int jabber_iq_disco_server(struct im_connection *ic)
    858865{
    859866        struct xt_node *node, *iq;
Note: See TracChangeset for help on using the changeset viewer.