mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-15 22:22:22 +01:00
When MUC strips image, show body
(cherry picked from commit 28874921bffd0520063239e78c616fc0fba9bf5e)
This commit is contained in:
parent
fe79e3fe15
commit
6cd06c7cbb
3 changed files with 7 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue