When MUC strips image, show body

(cherry picked from commit 28874921bffd0520063239e78c616fc0fba9bf5e)
This commit is contained in:
Stephen Paul Weber 2024-08-26 14:28:18 -05:00 committed by Arne
parent fe79e3fe15
commit 6cd06c7cbb
3 changed files with 7 additions and 2 deletions

View file

@ -1471,7 +1471,12 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
}
public synchronized void resetFileParams() {
this.oob = false;
this.fileParams = null;
this.transferable = null;
this.payloads.removeAll(getSims());
clearFallbacks(Namespace.OOB);
setType(isPrivateMessage() ? TYPE_PRIVATE : TYPE_TEXT);
}
public synchronized void setFileParams(FileParams fileParams) {

View file

@ -339,7 +339,7 @@ public class HttpDownloadConnection implements Transferable {
FileBackend.updateFileParams(message, fileParams.url, size);
mXmppConnectionService.databaseBackend.updateMessage(message, true);
file.setExpectedSize(size);
message.resetFileParams();
message.setFileParams(null);
if (mHttpConnectionManager.hasStoragePermission()
&& size <= mHttpConnectionManager.getAutoAcceptFileSize()
&& mXmppConnectionService.isDataSaverDisabled()) {

View file

@ -5359,8 +5359,8 @@ public class XmppConnectionService extends Service {
message.setSubject(subject);
message.setThread(thread);
if (attachments != null && attachments.isEmpty()) {
message.setFileParams(null);
message.setRelativeFilePath(null);
message.resetFileParams();
}
markMessage(message, status, null, true);
} else {