Skip to content

Commit 621e0a2

Browse files
Attachments persisted after message editing
1 parent ad90f33 commit 621e0a2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
### 🐞 Fixed
1212
- `AttachmentTextView` respects configured body font
13+
- Attachments persisted after message editing
1314

1415
### ✅ Added
1516
- Option to specify bottom offset in `ReactionsOverlayView`

Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ open class MessageComposerViewModel: ObservableObject {
469469
messageId: message.id
470470
)
471471

472-
messageController.editMessage(text: adjustedText) { [weak self] error in
472+
messageController.editMessage(
473+
text: adjustedText,
474+
attachments: message.allAttachments.toAnyAttachmentPayload()
475+
) { [weak self] error in
473476
if error != nil {
474477
self?.errorShown = true
475478
} else {

0 commit comments

Comments
 (0)