Skip to content

Commit 48c177d

Browse files
authored
Include current user in the more channel actions members list (#1001)
1 parent c7547c2 commit 48c177d

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2424
- Fix replying to unread messages marking them instantly as read [#989](https://github.com/GetStream/stream-chat-swiftui/pull/989)
2525
- Fix rendering of the add users button on iOS 26 [#999](https://github.com/GetStream/stream-chat-swiftui/pull/999)
2626
- Use `ColorPalette.navigationBarTint` for the background of the add users button [#999](https://github.com/GetStream/stream-chat-swiftui/pull/999)
27+
- Fix showing all the channel members in the more channel actions view [#1001](https://github.com/GetStream/stream-chat-swiftui/pull/1001)
2728

2829
# [4.89.1](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.89.1)
2930
_September 23, 2025_

Sources/StreamChatSwiftUI/ChatChannelList/MoreChannelActionsViewModel.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ open class MoreChannelActionsViewModel: ObservableObject {
5353
) {
5454
self.channelActions = channelActions
5555
self.channel = channel
56-
members = channel.lastActiveMembers.filter { [unowned self] member in
57-
member.id != chatClient.currentUserId
58-
}
56+
members = channel.lastActiveMembers
5957
}
6058

6159
/// Returns an image for a member.

StreamChatSwiftUITests/Tests/ChatChannelList/MoreChannelActionsViewModel_Tests.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,23 @@ class MoreChannelActionsViewModel_Tests: StreamChatTestCase {
1616
streamChat = StreamChat(chatClient: chatClient, utils: utils)
1717
}
1818

19-
func test_moreActionsVM_membersLoaded() {
19+
func test_moreActionsVM_membersLoaded() throws {
2020
// Given
21+
let currentUserId = try XCTUnwrap(streamChat?.chatClient.currentUserId)
2122
let memberId: String = .unique
2223
let viewModel = makeMoreActionsViewModel(
23-
members: [.mock(id: memberId, isOnline: true)]
24+
members: [
25+
.mock(id: memberId, isOnline: true),
26+
.mock(id: currentUserId, isOnline: true)
27+
]
2428
)
2529

2630
// When
2731
let members = viewModel.members
2832

2933
// Then
30-
XCTAssert(members.count == 1)
31-
XCTAssert(members[0].id == memberId)
34+
XCTAssert(members.count == 2)
35+
XCTAssert(members.map(\.id) == [memberId, currentUserId])
3236
}
3337

3438
func test_moreActionsVM_chatHeaderInfo() {

0 commit comments

Comments
 (0)