diff options
author | James Booth <boothj5@gmail.com> | 2016-08-28 22:42:09 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-08-28 22:42:09 +0100 |
commit | 47a1a62009d411002d4e3b1d6eefd55ba2fe1011 (patch) | |
tree | 432597c803a0988198a90659d0bec02a2d4c4bc6 /src/xmpp | |
parent | ea98a8b04a0577bd6aacc81f9c98b2b7c4d5cc68 (diff) | |
download | profani-tty-47a1a62009d411002d4e3b1d6eefd55ba2fe1011.tar.gz |
Add sv_ev_bookmark_autojoin
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/bookmark.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 88b452f2..d4371dc5 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -294,22 +294,7 @@ _bookmark_result_id_handler(xmpp_stanza_t *const stanza, void *const userdata) g_hash_table_insert(bookmarks, strdup(barejid), bookmark); if (autojoin_val) { - Jid *room_jid; - - char *account_name = session_get_account_name(); - ProfAccount *account = accounts_get_account(account_name); - if (nick == NULL) { - nick = account->muc_nick; - } - - log_debug("Autojoin %s with nick=%s", barejid, nick); - room_jid = jid_create_from_bare_and_resource(barejid, nick); - if (!muc_active(room_jid->barejid)) { - presence_join_room(barejid, nick, password); - muc_join(barejid, nick, password, TRUE); - } - jid_destroy(room_jid); - account_free(account); + sv_ev_bookmark_autojoin(bookmark); } child = xmpp_stanza_get_next(child); |