aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-16 16:16:43 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commit03a349bfafe7e65abdbb692707e3361a9fdc57f4 (patch)
tree7866a1ef708bd253ec02138f0ff8da59469d17f3 /libdino/src/service
parentbbfac9115500405095210f046dbccef913d03e04 (diff)
downloaddino-03a349bfafe7e65abdbb692707e3361a9fdc57f4.tar.gz
dino-03a349bfafe7e65abdbb692707e3361a9fdc57f4.zip
Small fixes to MucManager
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/muc_manager.vala13
1 files changed, 9 insertions, 4 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index 23c234a4..3b452f20 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -105,7 +105,10 @@ public class MucManager : StreamInteractionModule, Object {
Gee.List<Jid>? occupants = get_occupants(jid, account);
Jid? own_jid = get_own_jid(jid, account);
if (occupants != null && own_jid != null) {
- occupants.remove(own_jid);
+ Gee.List<Jid> occupants_ = new ArrayList<Jid>(Jid.equals_func);
+ occupants_.add_all(occupants);
+ occupants_.remove(own_jid);
+ return occupants_;
}
return occupants;
}
@@ -309,7 +312,8 @@ public class MucManager : StreamInteractionModule, Object {
foreach (Xep.Bookmarks.Conference conference in conferences) {
if (conference.jid.equals_bare(jid) && conference.nick == nick && conference.password == password) {
if (!conference.autojoin) {
- stream.get_module(Xep.Bookmarks.Module.IDENTITY).replace_conference(stream, conference, changed);
+ conference.autojoin = true;
+ stream.get_module(Xep.Bookmarks.Module.IDENTITY).set_conferences(stream, conferences);
}
return;
}
@@ -324,8 +328,9 @@ public class MucManager : StreamInteractionModule, Object {
foreach (Xep.Bookmarks.Conference conference in conferences) {
if (conference.jid.equals_bare(jid)) {
if (conference.autojoin) {
- Xep.Bookmarks.Conference change = new Xep.Bookmarks.Conference(conference.jid) { nick=conference.nick, password=conference.password, autojoin=false };
- stream.get_module(Xep.Bookmarks.Module.IDENTITY).replace_conference(stream, conference, change);
+ conference.autojoin = false;
+ stream.get_module(Xep.Bookmarks.Module.IDENTITY).set_conferences(stream, conferences);
+ return;
}
}
}