aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/entity/conversation.vala4
-rw-r--r--libdino/src/service/connection_manager.vala2
2 files changed, 4 insertions, 2 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;
diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala
index 977fc732..ad846ba2 100644
--- a/libdino/src/service/connection_manager.vala
+++ b/libdino/src/service/connection_manager.vala
@@ -232,7 +232,7 @@ public class ConnectionManager : Object {
private void check_reconnect(Account account) {
bool acked = false;
- DateTime? last_activity_was = connections[account].last_activity != null ? connections[account].last_activity : null;
+ DateTime? last_activity_was = connections[account].last_activity;
XmppStream stream = connections[account].stream;
stream.get_module(Xep.Ping.Module.IDENTITY).send_ping(stream, account.bare_jid.domain_jid, () => {