diff options
Diffstat (limited to 'src/xmpp/bookmark.c')
-rw-r--r-- | src/xmpp/bookmark.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 99b2e20d..65009224 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -1,7 +1,7 @@ /* * bookmark.c * - * Copyright (C) 2012 - 2017 James Booth <boothj5@gmail.com> + * Copyright (C) 2012 - 2018 James Booth <boothj5@gmail.com> * * This file is part of Profanity. * @@ -98,6 +98,12 @@ bookmark_add(const char *jid, const char *nick, const char *password, const char { assert(jid != NULL); + Jid *jidp = jid_create(jid); + if (jidp->domainpart) { + muc_confserver_add(jidp->domainpart); + } + jid_destroy(jidp); + if (g_hash_table_contains(bookmarks, jid)) { return FALSE; } @@ -297,6 +303,12 @@ _bookmark_result_id_handler(xmpp_stanza_t *const stanza, void *const userdata) sv_ev_bookmark_autojoin(bookmark); } + Jid *jidp = jid_create(barejid); + if (jidp->domainpart) { + muc_confserver_add(jidp->domainpart); + } + jid_destroy(jidp); + child = xmpp_stanza_get_next(child); } |