diff options
Diffstat (limited to 'protocols/jabber')
-rw-r--r-- | protocols/jabber/jabber_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index 38daaa26..c3c9df34 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -513,7 +513,11 @@ struct jabber_buddy *jabber_buddy_by_jid(struct im_connection *ic, char *jid_, g jabber_buddy_add(ic, jid_) : NULL; } else if (bud->resource && (flags & GET_BUDDY_EXACT)) { /* We want an exact match, so in thise case there shouldn't be a /resource. */ - return NULL; + if (head != bud && head->resource == NULL) { + return head; + } else { + return NULL; + } } else if (bud->resource == NULL || bud->next == NULL) { /* No need for selection if there's only one option. */ return bud; |