Skip to content
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
12 changes: 12 additions & 0 deletions src/main/java/io/getstream/chat/java/models/ChannelType.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public class ChannelType {
@JsonProperty("reminders")
private Boolean reminders;

@Nullable
@JsonProperty("user_message_reminders")
private Boolean userMessageReminders;

@Nullable
@JsonProperty("connect_events")
private Boolean connectEvents;
Expand Down Expand Up @@ -330,6 +334,10 @@ public static class ChannelTypeCreateRequestData {
@JsonProperty("reminders")
protected Boolean reminders;

@Nullable
@JsonProperty("user_message_reminders")
protected Boolean userMessageReminders;

@Nullable
@JsonProperty("connect_events")
protected Boolean connectEvents;
Expand Down Expand Up @@ -477,6 +485,10 @@ public static class ChannelTypeUpdateRequestData {
@JsonProperty("reminders")
protected Boolean reminders;

@Nullable
@JsonProperty("user_message_reminders")
protected Boolean userMessageReminders;

@Nullable
@JsonProperty("connect_events")
protected Boolean connectEvents;
Expand Down
25 changes: 25 additions & 0 deletions src/test/java/io/getstream/chat/java/ChannelTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,29 @@ void whenManipulatingChannelTypeWithGrants_throwsNoException() {
return new HashSet<>(actualGrants).equals(new HashSet<>(expectedGrants));
});
}

@DisplayName("Can set user_message_reminders field on channel type")
@Test
void whenSettingUserMessageRemindersOnChannelType_thenFieldIsAccessible() {
String channelTypeName = RandomStringUtils.randomAlphabetic(10);

// Create a basic channel type first
Assertions.assertDoesNotThrow(
() -> ChannelType.create().withDefaultConfig().name(channelTypeName).request());
pause();

// Test that the field can be set (even if Push V3 is not enabled, the field should be settable)
// The API will reject enabling it without Push V3, but the field should still be in the model
Assertions.assertDoesNotThrow(
() -> ChannelType.update(channelTypeName).userMessageReminders(false).request());
pause();

// Retrieve and verify the field is accessible
var retrieved = Assertions.assertDoesNotThrow(() -> ChannelType.get(channelTypeName).request());
Assertions.assertEquals(channelTypeName, retrieved.getName());
// The field should be present in the response (even if false)
Assertions.assertNotNull(retrieved.getUserMessageReminders());

Assertions.assertDoesNotThrow(() -> ChannelType.delete(channelTypeName));
}
}