From 091c376fe80456d18e046ea047072d0271bb4384 Mon Sep 17 00:00:00 2001 From: Lexie Date: Sun, 13 Oct 2024 08:50:09 +0200 Subject: [PATCH] Fix serialization of `before` parameter (#717) --- 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(), }, );