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?
|
// TODO(Unknown): Consider all sources?
|
||||||
final source = data.sources.first;
|
final source = data.sources.first;
|
||||||
OOBData? oob;
|
OOBData? oob;
|
||||||
|
MessageBodyData? body;
|
||||||
if (source is StatelessFileSharingUrlSource && data.includeOOBFallback) {
|
if (source is StatelessFileSharingUrlSource && data.includeOOBFallback) {
|
||||||
// SFS recommends OOB as a fallback
|
// SFS recommends OOB as a fallback
|
||||||
oob = OOBData(source.url, null);
|
oob = OOBData(source.url, null);
|
||||||
|
body = MessageBodyData(source.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
data.toXML(),
|
data.toXML(),
|
||||||
if (oob != null) oob.toXML(),
|
if (oob != null) oob.toXML(),
|
||||||
|
if (body != null) body.toXML(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user