diff options
| author | frosty <frostinator33@airmail.cc> | 2026-10-26 10:21:57 -0400 |
|---|---|---|
| committer | frosty <frostinator33@airmail.cc> | 2026-10-26 10:21:57 -0400 |
| commit | 74aecd8b0986d07b50b7ce310d64e645b8b54e38 (patch) | |
| tree | 560e6434f183eb54cd779936f3a4c9575146a066 /plugins/omemo/src/ui/call_encryption_entry.vala | |
| parent | 3d7e90d401da02d430a87db0ec7e1db3a6f1a68f (diff) | |
| parent | 4436001bb361ad4f9e4e05819214ecf0ea77c063 (diff) | |
Merge 'upstream/master'
Diffstat (limited to 'plugins/omemo/src/ui/call_encryption_entry.vala')
| -rw-r--r-- | plugins/omemo/src/ui/call_encryption_entry.vala | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/plugins/omemo/src/ui/call_encryption_entry.vala b/plugins/omemo/src/ui/call_encryption_entry.vala deleted file mode 100644 index 69b7b686..00000000 --- a/plugins/omemo/src/ui/call_encryption_entry.vala +++ /dev/null @@ -1,57 +0,0 @@ -using Dino.Entities; -using Gtk; -using Qlite; -using Xmpp; - -namespace Dino.Plugins.Omemo { - - public class CallEncryptionEntry : Plugins.CallEncryptionEntry, Object { - private Database db; - - public CallEncryptionEntry(Database db) { - this.db = db; - } - - public Plugins.CallEncryptionWidget? get_widget(Account account, Xmpp.Xep.Jingle.ContentEncryption encryption) { - DtlsSrtpVerificationDraft.OmemoContentEncryption? omemo_encryption = encryption as DtlsSrtpVerificationDraft.OmemoContentEncryption; - if (omemo_encryption == null) return null; - - int identity_id = db.identity.get_id(account.id); - Row? device = db.identity_meta.get_device(identity_id, omemo_encryption.jid.to_string(), omemo_encryption.sid); - if (device == null) return null; - TrustLevel trust = (TrustLevel) device[db.identity_meta.trust_level]; - - return new CallEncryptionWidget(trust); - } - } - - public class CallEncryptionWidget : Plugins.CallEncryptionWidget, Object { - - string? title = null; - string? icon = null; - bool should_show_keys = false; - - public CallEncryptionWidget(TrustLevel trust) { - if (trust == TrustLevel.VERIFIED) { - title = "This call is <b>encrypted and verified</b> with OMEMO."; - icon = "dino-security-high-symbolic"; - should_show_keys = false; - } else { - title = "This call is encrypted with OMEMO."; - should_show_keys = true; - } - } - - public string? get_title() { - return title; - } - - public string? get_icon_name() { - return icon; - } - - public bool show_keys() { - return should_show_keys; - } - } -} |
