Skip to content

Commit f19754b

Browse files
authored
Use channel type instead of always using ChannelType messaging (#311)
1 parent 442bdd1 commit f19754b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

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

66
### 🐞 Fixed
77
- Fixed the text input cursor when a message is being edited
8+
- Fixed channel list view model always not using passed channel type for deletion
89

910
### ✅ Added
1011
- Added a factory method for customizing the composer text input view

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
197197

198198
public func delete(channel: ChatChannel) {
199199
let controller = chatClient.channelController(
200-
for: .init(type: .messaging, id: channel.cid.id)
200+
for: .init(type: channel.type, id: channel.cid.id)
201201
)
202202

203203
controller.deleteChannel { [weak self] error in

0 commit comments

Comments
 (0)