aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/plugin.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-10-22 01:23:43 +0200
committerfiaxh <git@lightrise.org>2019-10-22 01:23:43 +0200
commit26e970a4d4e835cc879fc8cc5a0604fb50e67ce3 (patch)
tree1e57bf88cb3f28c04b7d855adef0d2c1002ff02b /plugins/omemo/src/plugin.vala
parentc032ab00ecc9d2b0c5d2fdbc5bd622a5406f691c (diff)
downloaddino-26e970a4d4e835cc879fc8cc5a0604fb50e67ce3.tar.gz
dino-26e970a4d4e835cc879fc8cc5a0604fb50e67ce3.zip
Colapse inactive keys in OMEMO keys dialog
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;
+ }
}
}