aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorPapsOu <PapsOu@users.noreply.github.com>2018-10-24 17:48:29 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2018-10-24 17:48:29 +0200
commit4ad07fea47e9e3463e864673b9c601b304b05270 (patch)
tree4db5b1ccba4bea7e184db1404d17f091cbe3fe12 /libdino/src
parentab7cd67851070440014a794168d4e20ed5c6c878 (diff)
downloaddino-4ad07fea47e9e3463e864673b9c601b304b05270.tar.gz
dino-4ad07fea47e9e3463e864673b9c601b304b05270.zip
Fix messages never being notified from servers without MAM (#432)
* Comment a return that stop every notifications to be trigger when an account is not synced * Do a correct check if MAM capability is available for the message to notify
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/notification_events.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdino/src/service/notification_events.vala b/libdino/src/service/notification_events.vala
index 8c86f9d4..c0efd7de 100644
--- a/libdino/src/service/notification_events.vala
+++ b/libdino/src/service/notification_events.vala
@@ -44,7 +44,8 @@ public class NotificationEvents : StreamInteractionModule, Object {
}
private void on_message_received(Entities.Message message, Conversation conversation) {
- if (!synced_accounts.contains(conversation.account)) {
+ bool is_mam_message = Xep.MessageArchiveManagement.MessageFlag.get_flag(message.stanza) != null;
+ if (!synced_accounts.contains(conversation.account) && is_mam_message) {
if (!mam_potential_new.has_key(conversation.account)) {
mam_potential_new[conversation.account] = new HashMap<Conversation, Entities.Message>(Conversation.hash_func, Conversation.equals_func);
}