diff options
Diffstat (limited to 'protocols/jabber/iq.c')
-rw-r--r-- | protocols/jabber/iq.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c index d7ba6f55..33889d32 100644 --- a/protocols/jabber/iq.c +++ b/protocols/jabber/iq.c @@ -26,7 +26,6 @@ static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *node, struct xt_node *orig); static xt_status jabber_iq_display_vcard(struct im_connection *ic, struct xt_node *node, struct xt_node *orig); -static int jabber_iq_disco_server(struct im_connection *ic); xt_status jabber_pkt_iq(struct xt_node *node, gpointer data) { @@ -373,6 +372,7 @@ int jabber_get_roster(struct im_connection *ic) static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *node, struct xt_node *orig) { + struct jabber_data *jd = ic->proto_data; struct xt_node *query, *c; int initial = (orig != NULL); @@ -387,6 +387,7 @@ static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *n char *jid = xt_find_attr(c, "jid"); char *name = xt_find_attr(c, "name"); char *sub = xt_find_attr(c, "subscription"); + char *mention_name = xt_find_attr(c, "mention_name"); if (jid && sub) { if ((strcmp(sub, "both") == 0 || strcmp(sub, "to") == 0)) { @@ -396,6 +397,12 @@ static xt_status jabber_parse_roster(struct im_connection *ic, struct xt_node *n if (name) { imcb_rename_buddy(ic, jid, name); } + + /* This could also be used to set the full name as nick for fb/gtalk, + * but i'm keeping the old (ugly?) default behavior just to be safe */ + if (mention_name && (jd->flags & JFLAG_HIPCHAT)) { + imcb_buddy_nick_hint(ic, jid, mention_name); + } } else if (strcmp(sub, "remove") == 0) { jabber_buddy_remove_bare(ic, jid); imcb_remove_buddy(ic, jid, NULL); @@ -854,7 +861,7 @@ static xt_status jabber_iq_version_response(struct im_connection *ic, static xt_status jabber_iq_disco_server_response(struct im_connection *ic, struct xt_node *node, struct xt_node *orig); -static int jabber_iq_disco_server(struct im_connection *ic) +int jabber_iq_disco_server(struct im_connection *ic) { struct xt_node *node, *iq; struct jabber_data *jd = ic->proto_data; |