aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/own_notifications.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/own_notifications.vala
parentb589275ab46d42584bfc99edfa2054e9c8841ccc (diff)
downloaddino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.tar.gz
dino-e2932af18f31d8457c3d72ba9d3b80d912934c7f.zip
Index consistently with the identity id
Diffstat (limited to 'plugins/omemo/src/own_notifications.vala')
-rw-r--r--plugins/omemo/src/own_notifications.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/omemo/src/own_notifications.vala b/plugins/omemo/src/own_notifications.vala
index 296e00b6..862ff33a 100644
--- a/plugins/omemo/src/own_notifications.vala
+++ b/plugins/omemo/src/own_notifications.vala
@@ -26,7 +26,10 @@ public class OwnNotifications {
}
public bool has_new_devices(Jid jid) {
- return plugin.db.identity_meta.get_new_devices(account.id, jid.bare_jid.to_string()).count() > 0;
+ int identity_id = plugin.db.identity.get_id(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;
}
private void display_notification() {