aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/muc_manager.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index d6132d19..2c916c99 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -14,6 +14,7 @@ public class MucManager : StreamInteractionModule, Object {
public signal void bookmarks_updated(Account account, Gee.List<Xep.Bookmarks.Conference> conferences);
private StreamInteractor stream_interactor;
+ private HashMap<Jid, Xep.Muc.MucEnterError> enter_errors = new HashMap<Jid, Xep.Muc.MucEnterError>(Jid.hash_func, Jid.equals_func);
public static void start(StreamInteractor stream_interactor) {
MucManager m = new MucManager(stream_interactor);
@@ -28,6 +29,8 @@ public class MucManager : StreamInteractionModule, Object {
}
public void join(Account account, Jid jid, string? nick, string? password) {
+ if (enter_errors.has_key(jid)) return;
+
Core.XmppStream? stream = stream_interactor.get_stream(account);
if (stream == null) return;
string nick_ = nick ?? account.bare_jid.localpart ?? account.bare_jid.domainpart;
@@ -204,6 +207,9 @@ public class MucManager : StreamInteractionModule, Object {
stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).room_entered.connect( (stream, jid, nick) => {
joined(account, new Jid(jid), nick);
});
+ stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).room_enter_error.connect( (stream, jid, error) => {
+ enter_errors[new Jid(jid)] = error;
+ });
stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).self_removed_from_room.connect( (stream, jid, code) => {
left(account, new Jid(jid));
});