diff --git a/src/transformers/channel.ts b/src/transformers/channel.ts index 8ef1c0284..d0142a2dd 100644 --- a/src/transformers/channel.ts +++ b/src/transformers/channel.ts @@ -74,7 +74,7 @@ export function transformChannel( archived: payload.channel.thread_metadata?.archived, locked: payload.channel.thread_metadata?.locked, invitable: payload.channel.invitable, - createTimestamp: payload.channel.create_timestamp, + createTimestamp: payload.channel.create_timestamp ? Date.parse(payload.channel.create_timestamp) : undefined, }; } diff --git a/src/types/channels/channel.ts b/src/types/channels/channel.ts index 08eceba10..8c2dfd6e0 100644 --- a/src/types/channels/channel.ts +++ b/src/types/channels/channel.ts @@ -63,5 +63,5 @@ export interface Channel { /** whether non-moderators can add other non-moderators to a thread; only available on private threads */ invitable?: boolean; /** timestamp when the thread was created; only populated for threads created after 2022-01-09 */ - createTimestamp?: number; + createTimestamp?: string; }