From cb8773d8e26b31db15cf37ba5d7a0db117df2103 Mon Sep 17 00:00:00 2001 From: Lexedia Date: Sun, 13 Oct 2024 00:18:51 +0200 Subject: [PATCH] Fix serialization of `before` parameter --- lib/src/http/managers/channel_manager.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/http/managers/channel_manager.dart b/lib/src/http/managers/channel_manager.dart index c51df2f9a..d897c986f 100644 --- a/lib/src/http/managers/channel_manager.dart +++ b/lib/src/http/managers/channel_manager.dart @@ -754,6 +754,7 @@ class ChannelManager extends ReadOnlyManager { } /// 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 listJoinedPrivateArchivedThreads(Snowflake id, {DateTime? before, int? limit}) async { final route = HttpRoute() ..channels(id: id.toString()) @@ -764,7 +765,7 @@ class ChannelManager extends ReadOnlyManager { 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(), }, );