Uses the remote attachment info when sending a message
Adding the local and remote attachments might lead to duplicated attachments, potentially. At the time of sending, the local and remote attachments should be the same. MAILAND-3070
This commit is contained in:
parent
a7ddf1f4ea
commit
a08a524a7f
|
@ -209,7 +209,8 @@ class SendMessageWorker @AssistedInject constructor(
|
|||
tryWithRetry {
|
||||
messageDetailsRepository.getRemoteMessageDetails(messageId, userId)
|
||||
}.map { remoteDraft ->
|
||||
localDraft.attachments = localDraft.attachments.plus(remoteDraft.attachments)
|
||||
localDraft.attachments = remoteDraft.attachments
|
||||
localDraft.numAttachments = remoteDraft.numAttachments
|
||||
}
|
||||
return localDraft
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue