aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/plugin.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/omemo/src/plugin.vala')
-rw-r--r--plugins/omemo/src/plugin.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/omemo/src/plugin.vala b/plugins/omemo/src/plugin.vala
index 913d3347..0e740f20 100644
--- a/plugins/omemo/src/plugin.vala
+++ b/plugins/omemo/src/plugin.vala
@@ -83,6 +83,13 @@ public class Plugin : RootInterface, Object {
public void shutdown() {
// Nothing to do
}
+
+ public bool has_new_devices(Account account, Xmpp.Jid jid) {
+ int identity_id = db.identity.get_id(account.id);
+ if (identity_id < 0) return false;
+
+ return db.identity_meta.get_new_devices(identity_id, jid.bare_jid.to_string()).count() > 0;
+ }
}
}