From a08c6542955a0f32dc84471a9e5e943a7b170178 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Mon, 2 Jan 2023 13:56:22 +0100 Subject: [PATCH] feat: Do not fetch bundles for our own device --- lib/src/omemo/omemomanager.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/omemo/omemomanager.dart b/lib/src/omemo/omemomanager.dart index bf99a49..1f1816c 100644 --- a/lib/src/omemo/omemomanager.dart +++ b/lib/src/omemo/omemomanager.dart @@ -408,9 +408,12 @@ class OmemoManager { if (bundlesToFetch.isNotEmpty) { _log.finest('Fetching bundles $bundlesToFetch for $jid'); } - + + final device = await getDevice(); final newBundles = List.empty(growable: true); for (final id in bundlesToFetch) { + if (jid == device.jid && id == device.id) continue; + final bundle = await fetchDeviceBundleImpl(jid, id); if (bundle != null) newBundles.add(bundle); }