Skip to content

Commit

Permalink
Fix serialization of before parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapougnac committed Oct 12, 2024
1 parent f7f1eda commit cb8773d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/http/managers/channel_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ class ChannelManager extends ReadOnlyManager<Channel> {
}

/// List the private archived threads the current user has joined in a channel.
// TODO(lexedia): for nyxx v7, this needs to be updated to use `Snowflake` instead of `DateTime`.
Future<ThreadList> listJoinedPrivateArchivedThreads(Snowflake id, {DateTime? before, int? limit}) async {
final route = HttpRoute()
..channels(id: id.toString())
Expand All @@ -764,7 +765,7 @@ class ChannelManager extends ReadOnlyManager<Channel> {
final request = BasicRequest(
route,
queryParameters: {
if (before != null) 'before': before.toIso8601String(),
if (before != null) 'before': Snowflake.fromDateTime(before).toString(),
if (limit != null) 'limit': limit.toString(),
},
);
Expand Down

0 comments on commit cb8773d

Please sign in to comment.