diff options
author | fiaxh <git@lightrise.org> | 2021-10-12 16:26:50 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-10-12 19:43:57 +0200 |
commit | e8c162eae3827a4f2abdf97b1e42f7398744c10e (patch) | |
tree | 30c0e693057f9998550d74c17291441b05fb970f /xmpp-vala/src/module/xep/0045_muc | |
parent | bea85c8ab5f74d96f37c1b3a6ea1e83edd0de500 (diff) | |
download | dino-e8c162eae3827a4f2abdf97b1e42f7398744c10e.tar.gz dino-e8c162eae3827a4f2abdf97b1e42f7398744c10e.zip |
Fix misc compiler warnings
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index 21c7b2a0..718ad255 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -9,7 +9,6 @@ private const string NS_URI_USER = NS_URI + "#user"; private const string NS_URI_REQUEST = NS_URI + "#request"; public enum MucEnterError { - NONE, PASSWORD_REQUIRED, BANNED, ROOM_DOESNT_EXIST, @@ -286,7 +285,7 @@ public class Module : XmppStreamModule { Jid bare_jid = presence.from.bare_jid; ErrorStanza? error_stanza = presence.get_error(); if (flag.get_enter_id(bare_jid) == presence.id) { - MucEnterError error = MucEnterError.NONE; + MucEnterError? error = null; switch (error_stanza.condition) { case ErrorStanza.CONDITION_NOT_AUTHORIZED: if (ErrorStanza.TYPE_AUTH == error_stanza.type_) error = MucEnterError.PASSWORD_REQUIRED; @@ -313,7 +312,7 @@ public class Module : XmppStreamModule { if (ErrorStanza.TYPE_CANCEL == error_stanza.type_) error = MucEnterError.USE_RESERVED_ROOMNICK; break; } - if (error != MucEnterError.NONE) { + if (error != null) { flag.enter_futures[bare_jid].set_value(new JoinResult() {muc_error=error}); } else { flag.enter_futures[bare_jid].set_value(new JoinResult() {stanza_error=error_stanza.condition}); |