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/own_notifications.vala | |
| parent | 3d7e90d401da02d430a87db0ec7e1db3a6f1a68f (diff) | |
| parent | 4436001bb361ad4f9e4e05819214ecf0ea77c063 (diff) | |
Merge 'upstream/master'
Diffstat (limited to 'plugins/omemo/src/ui/own_notifications.vala')
| -rw-r--r-- | plugins/omemo/src/ui/own_notifications.vala | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/plugins/omemo/src/ui/own_notifications.vala b/plugins/omemo/src/ui/own_notifications.vala deleted file mode 100644 index 7ff10e30..00000000 --- a/plugins/omemo/src/ui/own_notifications.vala +++ /dev/null @@ -1,35 +0,0 @@ -using Dino.Entities; -using Xmpp; -using Gtk; - -namespace Dino.Plugins.Omemo { - -public class OwnNotifications { - - private StreamInteractor stream_interactor; - private Plugin plugin; - private Account account; - - public OwnNotifications (Plugin plugin, StreamInteractor stream_interactor, Account account) { - this.stream_interactor = (!)stream_interactor; - this.plugin = plugin; - this.account = account; - stream_interactor.module_manager.get_module(account, StreamModule.IDENTITY).bundle_fetched.connect_after((jid, device_id, bundle) => { - if (jid.equals(account.bare_jid) && plugin.has_new_devices(account, account.bare_jid)) { - display_notification(); - } - }); - - if (plugin.has_new_devices(account, account.bare_jid)) { - display_notification(); - } - } - - private void display_notification() { - Notification notification = new Notification(_("OMEMO trust decision required")); - notification.set_default_action_and_target_value("app.own-keys", new Variant.int32(account.id)); - notification.set_body(_("Did you add a new device for account %s?").printf(@"$(account.bare_jid.to_string())")); - plugin.app.send_notification(account.id.to_string()+"-new-device", notification); - } -} -} |
