aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-02-20 16:29:23 +0100
committerfiaxh <git@lightrise.org>2020-02-20 17:15:51 +0100
commita81af020f30bfda4dec60a52aec142a0c5abb297 (patch)
tree5c130196e3fc6c702ab6fc6bd1b8cf1e52cc6fc9 /libdino
parent4c953b58827b0d3ccb1f3c052ed1c2b7242e7afa (diff)
downloaddino-a81af020f30bfda4dec60a52aec142a0c5abb297.tar.gz
dino-a81af020f30bfda4dec60a52aec142a0c5abb297.zip
Preserve unchanged conference data (name) in bookmarks
fixes #748
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/service/muc_manager.vala23
1 files changed, 4 insertions, 19 deletions
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;
}
}