From a81af020f30bfda4dec60a52aec142a0c5abb297 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 20 Feb 2020 16:29:23 +0100 Subject: Preserve unchanged conference data (name) in bookmarks fixes #748 --- libdino/src/service/muc_manager.vala | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'libdino') diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index 0e27b724..cd27e392 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -187,13 +187,6 @@ public class MucManager : StreamInteractionModule, Object { } } - public void replace_bookmark(Account account, Conference was, Conference replace) { - XmppStream? stream = stream_interactor.get_stream(account); - if (stream != null) { - stream.get_module(Xep.Bookmarks.Module.IDENTITY).replace_conference.begin(stream, was, replace); - } - } - public void remove_bookmark(Account account, Conference conference) { XmppStream? stream = stream_interactor.get_stream(account); if (stream != null) { @@ -380,12 +373,8 @@ public class MucManager : StreamInteractionModule, Object { foreach (Conference conference in conferences) { if (conference.jid.equals(jid)) { if (!conference.autojoin) { - Conference new_conference = new Conference(); - new_conference.jid = jid; - new_conference.autojoin = true; - new_conference.nick = nick; - new_conference.password = password; - bookmarks_provider[account].replace_conference.begin(stream, conference, new_conference); + Conference new_conference = new Conference() { jid=jid, nick=conference.nick, name=conference.name, password=conference.password, autojoin=true }; + bookmarks_provider[account].replace_conference.begin(stream, jid, new_conference); } return; } @@ -403,12 +392,8 @@ public class MucManager : StreamInteractionModule, Object { foreach (Conference conference in conferences) { if (conference.jid.equals(jid)) { if (conference.autojoin) { - Conference new_conference = new Conference(); - new_conference.jid = jid; - new_conference.autojoin = false; - new_conference.nick = conference.nick; - new_conference.password = conference.password; - bookmarks_provider[account].replace_conference.begin(stream, conference, new_conference); + Conference new_conference = new Conference() { jid=jid, nick=conference.nick, name=conference.name, password=conference.password, autojoin=false }; + bookmarks_provider[account].replace_conference.begin(stream, jid, new_conference); return; } } -- cgit v1.2.3-70-g09d2