fix(xep): Fix the OOB fallback for SFS
This commit is contained in:
parent
925a46c0da
commit
88545e3308
@ -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(),
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user