Skip to content
2 changes: 1 addition & 1 deletion src/Clients/MessageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public async Task<QueryRemindersResponse> QueryRemindersAsync(string userId, Dic

if (filterConditions != null)
{
data["filter_conditions"] = filterConditions;
data["filter"] = filterConditions;
}

if (sort != null)
Expand Down
2 changes: 2 additions & 0 deletions src/Models/ChannelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public abstract class ChannelTypeRequestBase
public bool? Reactions { get; set; }
public bool? Replies { get; set; }
public bool? Reminders { get; set; }
public bool? UserMessageReminders { get; set; }
public bool? Uploads { get; set; }
public bool? MarkMessagesPending { get; set; }
public bool? Mutes { get; set; }
Expand Down Expand Up @@ -92,6 +93,7 @@ public abstract class ChannelTypeResponseBase : ApiResponse
public bool? Search { get; set; }
public bool? Reactions { get; set; }
public bool? Replies { get; set; }
public bool? UserMessageReminders { get; set; }
public bool? Uploads { get; set; }
public bool? Mutes { get; set; }
public string MessageRetention { get; set; }
Expand Down
85 changes: 85 additions & 0 deletions tests/ChannelTypeClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,90 @@ await WaitForAsync(async () =>
}
});
}

[Test]
public async Task TestUserMessageRemindersFieldOnChannelTypeAsync()
{
var channelTypeName = Guid.NewGuid().ToString();
ChannelTypeWithStringCommandsResponse createdChannelType = null;

try
{
// Create a basic channel type (without user_message_reminders enabled)
// We're testing that the field exists in the model, not that it can be enabled
// (enabling requires Push V3 which may not be configured in test environment)
createdChannelType = await _channelTypeClient.CreateChannelTypeAsync(
new ChannelTypeWithStringCommandsRequest
{
Name = channelTypeName,
});

// Retrieve the channel type
await WaitForAsync(async () =>
{
try
{
var retrieved = await _channelTypeClient.GetChannelTypeAsync(channelTypeName);
return retrieved.Name == channelTypeName;
}
catch
{
return false;
}
});

// Test that the field can be set to false (should work without Push V3)
var updated = await _channelTypeClient.UpdateChannelTypeAsync(channelTypeName,
new ChannelTypeWithStringCommandsRequest
{
UserMessageReminders = false,
});

// Verify the field is accessible in the response (even if false)
updated.UserMessageReminders.Should().NotBeNull();

// Verify the update persisted and field is accessible
await WaitForAsync(async () =>
{
try
{
var retrieved = await _channelTypeClient.GetChannelTypeAsync(channelTypeName);

// The field should be present in the response
return retrieved.UserMessageReminders != null;
}
catch
{
return false;
}
});
}
finally
{
// Cleanup
if (createdChannelType != null)
{
try
{
await WaitForAsync(async () =>
{
try
{
await _channelTypeClient.DeleteChannelTypeAsync(channelTypeName);
return true;
}
catch
{
return false;
}
});
}
catch (TimeoutException)
{
// Ignore cleanup failures
}
}
}
}
}
}
Loading