aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity/conversation.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-09-16 13:54:47 +0200
committerfiaxh <git@mx.ax.lt>2018-09-16 14:04:36 +0200
commit9575b192e4d22d9f5422fae1b02ddf81db1ecf68 (patch)
tree8d311c2bd920b02d7cf2f1f45eb41dca5a1d7a14 /libdino/src/entity/conversation.vala
parent6d947c42b5e573cb350a1354a47a3a806a22cbb2 (diff)
downloaddino-9575b192e4d22d9f5422fae1b02ddf81db1ecf68.tar.gz
dino-9575b192e4d22d9f5422fae1b02ddf81db1ecf68.zip
Fix runtime criticals
Diffstat (limited to 'libdino/src/entity/conversation.vala')
-rw-r--r--libdino/src/entity/conversation.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index 9026e33f..585db07e 100644
--- a/libdino/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
@@ -105,8 +105,11 @@ 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) {
- bool members_only = stream.get_flag(Xmpp.Xep.Muc.Flag.IDENTITY).has_room_feature(counterpart.bare_jid, Xmpp.Xep.Muc.Feature.MEMBERS_ONLY);
- return members_only ? NotifySetting.ON : NotifySetting.HIGHLIGHT;
+ 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;
+ }
}
return NotifySetting.ON;
}