aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/own_notifications.vala
diff options
context:
space:
mode:
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() {