aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-02-13 16:13:37 +0100
committerfiaxh <git@lightrise.org>2019-02-13 16:14:16 +0100
commitd668e0158df40e1bb1ea00ab72fac9d0e95e8bd9 (patch)
treebee26f616b6696c053f23200547e82c3c281a900 /libdino/src/entity
parent6613f3f05a548bb3b91d03becbaa694379ecdde4 (diff)
downloaddino-d668e0158df40e1bb1ea00ab72fac9d0e95e8bd9.tar.gz
dino-d668e0158df40e1bb1ea00ab72fac9d0e95e8bd9.zip
Fix runtime criticals (and compiler warnings)
fixes #520
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/conversation.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index 585db07e..145dc977 100644
--- a/libdino/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
@@ -105,10 +105,12 @@ public class Conversation : Object {
Xmpp.XmppStream? stream = stream_interactor.get_stream(account);
if (!Application.get_default().settings.notifications) return NotifySetting.OFF;
if (type_ == Type.GROUPCHAT) {
- Xmpp.Xep.Muc.Flag flag = stream.get_flag(Xmpp.Xep.Muc.Flag.IDENTITY);
+ Xmpp.Xep.Muc.Flag? flag = stream.get_flag(Xmpp.Xep.Muc.Flag.IDENTITY);
if (flag != null) {
bool members_only = flag.has_room_feature(counterpart.bare_jid, Xmpp.Xep.Muc.Feature.MEMBERS_ONLY);
return members_only ? NotifySetting.ON : NotifySetting.HIGHLIGHT;
+ } else {
+ return NotifySetting.OFF;
}
}
return NotifySetting.ON;