aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/device_notification_populator.vala
diff options
context:
space:
mode:
authorSamuel Hand <samuel.hand@openmailbox.org>2018-08-12 11:04:40 +0100
committerSamuel Hand <samuel.hand@openmailbox.org>2018-08-12 11:04:40 +0100
commite2932af18f31d8457c3d72ba9d3b80d912934c7f (patch)
treed0ce9dd2bd0e73fb090da8674431938e7c91fb7a /plugins/omemo/src/device_notification_populator.vala
parentb589275ab46d42584bfc99edfa2054e9c8841ccc (diff)
downloaddino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.tar.gz
dino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.zip
Index consistently with the identity id
Diffstat (limited to 'plugins/omemo/src/device_notification_populator.vala')
-rw-r--r--plugins/omemo/src/device_notification_populator.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/omemo/src/device_notification_populator.vala b/plugins/omemo/src/device_notification_populator.vala
index aee45472..900cac96 100644
--- a/plugins/omemo/src/device_notification_populator.vala
+++ b/plugins/omemo/src/device_notification_populator.vala
@@ -20,7 +20,9 @@ public class DeviceNotificationPopulator : NotificationPopulator, Object {
}
public bool has_new_devices(Jid jid) {
- return plugin.db.identity_meta.get_new_devices(current_conversation.account.id, jid.bare_jid.to_string()).count() > 0;
+ int identity_id = plugin.db.identity.get_id(current_conversation.account.id);
+ if (identity_id < 0) return false;
+ return plugin.db.identity_meta.get_new_devices(identity_id, jid.bare_jid.to_string()).count() > 0;
}
public void init(Conversation conversation, NotificationCollection notification_collection, Plugins.WidgetType type) {