Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add the new property #139

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/io/getstream/chat/java/models/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ public static class ChannelMember {
@Nullable
@JsonProperty("shadow_banned")
private Boolean shadowBanned;

@Nullable
@JsonProperty("notifications_muted")
private Boolean notificationsMuted;
}

@Data
Expand Down
13 changes: 13 additions & 0 deletions src/test/java/io/getstream/chat/java/ChannelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,19 @@ void whenMutingChannel_thenIsMuted() {
.user(testUserRequestObject)
.request());
Assertions.assertTrue(isChannelMutedForTestUser(channel.getType(), channel.getId()));
ChannelMember channelMember =
Assertions.assertDoesNotThrow(
() ->
Channel.queryMembers()
.id(channel.getId())
.type(channel.getType())
.request()
.getMembers()
.stream()
.filter(cm -> cm.getUserId().equals(testUserRequestObject.getId()))
.findFirst()
.get());
Assertions.assertTrue(channelMember.getNotificationsMuted());
}

private boolean isChannelMutedForTestUser(String channelType, String channelId) {
Expand Down
Loading