diff options
Diffstat (limited to 'plugins/omemo/src/device_notification_populator.vala')
-rw-r--r-- | plugins/omemo/src/device_notification_populator.vala | 4 |
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) { |