aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/conversation.vala20
-rw-r--r--libdino/src/entity/message.vala1
2 files changed, 12 insertions, 9 deletions
diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index 145dc977..9e8a3406 100644
--- a/libdino/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
@@ -102,27 +102,31 @@ public class Conversation : Object {
}
public NotifySetting get_notification_default_setting(StreamInteractor stream_interactor) {
- 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);
- 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;
+ if (stream_interactor.get_module(MucManager.IDENTITY).is_private_room(this.account, this.counterpart)) {
+ return NotifySetting.ON;
} else {
- return NotifySetting.OFF;
+ return NotifySetting.HIGHLIGHT;
}
}
return NotifySetting.ON;
}
- public Setting get_send_typing_setting() {
+ public Setting get_send_typing_setting(StreamInteractor stream_interactor) {
if (send_typing != Setting.DEFAULT) return send_typing;
+
+ if (stream_interactor.get_module(MucManager.IDENTITY).is_public_room(this.account, this.counterpart)) return Setting.OFF;
+
return Application.get_default().settings.send_typing ? Setting.ON : Setting.OFF;
}
- public Setting get_send_marker_setting() {
+ public Setting get_send_marker_setting(StreamInteractor stream_interactor) {
if (send_marker != Setting.DEFAULT) return send_marker;
+
+ if (stream_interactor.get_module(MucManager.IDENTITY).is_public_room(this.account, this.counterpart)) return Setting.OFF;
+
return Application.get_default().settings.send_marker ? Setting.ON : Setting.OFF;
}
diff --git a/libdino/src/entity/message.vala b/libdino/src/entity/message.vala
index ac54a7c2..a93b37ac 100644
--- a/libdino/src/entity/message.vala
+++ b/libdino/src/entity/message.vala
@@ -52,7 +52,6 @@ public class Message : Object {
marked_ = value;
}
}
- public Xmpp.MessageStanza stanza { get; set; }
private Database? db;