diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-31 01:17:01 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-31 16:39:28 +0200 |
commit | 22adbd38dca0868f0e10754314a3859bba0a7d87 (patch) | |
tree | 44ecf9cf8af6aef78030dade95aecb1de2b99873 /xmpp-vala/src/module/xep/0045_muc | |
parent | 7d2f995a097086be01426cc79c9c801dabaf9e3b (diff) | |
download | dino-22adbd38dca0868f0e10754314a3859bba0a7d87.tar.gz dino-22adbd38dca0868f0e10754314a3859bba0a7d87.zip |
Handle MUC private messages
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index 624d8421..486c342a 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -129,7 +129,7 @@ public class Module : XmppStreamModule { string bare_jid = get_bare_jid(presence.from); ErrorStanza? error_stanza = presence.get_error(); if (flag.get_enter_id(bare_jid) == error_stanza.original_id) { - ListenerHolder listener = flag.get_enter_listener(bare_jid); + ListenerHolder? listener = flag.get_enter_listener(bare_jid); MucEnterError? error = null; if (error_stanza.condition == ErrorStanza.CONDITION_NOT_AUTHORIZED && ErrorStanza.TYPE_AUTH == error_stanza.type_) { error = MucEnterError.PASSWORD_REQUIRED; @@ -144,7 +144,7 @@ public class Module : XmppStreamModule { } else if (ErrorStanza.CONDITION_ITEM_NOT_FOUND == error_stanza.condition && ErrorStanza.TYPE_CANCEL == error_stanza.type_) { error = MucEnterError.ROOM_DOESNT_EXIST; } - if (error == null) listener.on_error(stream, error, listener.reference); + if (error != null && listener != null) listener.on_error(stream, error, listener.reference); flag.finish_muc_enter(bare_jid); } } |