From 88545e33086e3de3358d44ec7d4c74107c2f4fcf Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Fri, 9 Jun 2023 00:07:18 +0200 Subject: [PATCH] fix(xep): Fix the OOB fallback for SFS --- packages/moxxmpp/lib/src/xeps/xep_0447.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/moxxmpp/lib/src/xeps/xep_0447.dart b/packages/moxxmpp/lib/src/xeps/xep_0447.dart index baed4f4..36bf848 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0447.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0447.dart @@ -151,14 +151,17 @@ class SFSManager extends XmppManagerBase { // TODO(Unknown): Consider all sources? final source = data.sources.first; OOBData? oob; + MessageBodyData? body; if (source is StatelessFileSharingUrlSource && data.includeOOBFallback) { // SFS recommends OOB as a fallback oob = OOBData(source.url, null); + body = MessageBodyData(source.url); } return [ data.toXML(), if (oob != null) oob.toXML(), + if (body != null) body.toXML(), ]; }