diff options
author | Marius Halden <marius.h@lden.org> | 2018-01-09 12:26:57 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2018-01-09 12:26:57 +0100 |
commit | 6dc54671e368d03ed447d0fbd2d662af6c36b7fd (patch) | |
tree | 17ae1399d3780dcbdfa71fca7a6c718573d26f5b | |
parent | 965d0c895a82f9e96fd2d717d2b28ab31fc09b5a (diff) | |
parent | 4a9c6b0b15eb3738897dc1635fda2e4be67414ad (diff) |
Merge branch 'master' into patched-master
-rw-r--r-- | protocols/jabber/conference.c | 6 | ||||
-rw-r--r-- | root_commands.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index 75f3100c..6af7688d 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -328,6 +328,9 @@ void jabber_chat_pkt_presence(struct im_connection *ic, struct jabber_buddy *bud } } bud->flags |= JBFLAG_IS_ANONYMOUS; + } else if (bud == jc->me) { + g_free(bud->ext_jid); + bud->ext_jid = g_strdup(jd->me); } if (bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS) { @@ -350,11 +353,12 @@ void jabber_chat_pkt_presence(struct im_connection *ic, struct jabber_buddy *bud *s = 0; /* Should NEVER be NULL, but who knows... */ } + imcb_chat_add_buddy(chat, bud->ext_jid); + if (bud != jc->me && (jc->flags & JCFLAG_ALWAYS_USE_NICKS) && !(bud->flags & JBFLAG_IS_ANONYMOUS)) { imcb_buddy_nick_change(ic, bud->ext_jid, bud->resource); } - imcb_chat_add_buddy(chat, bud->ext_jid); if (s) { *s = '/'; } diff --git a/root_commands.c b/root_commands.c index 9ffd3818..48400cdd 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1483,7 +1483,7 @@ void cmd_chat_list_finish(struct im_connection *ic) ci = l->data; topic = ci->topic ? ci->topic : ""; - padded = str_pad_and_truncate(ci->title, title_len, "[...]"); + padded = str_pad_and_truncate(ci->title ? ci->title : "", title_len, "[...]"); irc_rootmsg(irc, iformat, ++i, padded, topic); g_free(padded); } |