Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Uses the remote attachment info when sending a message
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Maciej Surmacz committed Jul 6, 2023
1 parent a7ddf1f commit a08a524
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a08a524

Please sign in to comment.