From 21460bd7756749306726d07ae30547041989c959 Mon Sep 17 00:00:00 2001 From: Amelia Date: Thu, 27 Aug 2026 08:30:28 -0400 Subject: [PATCH] fix: before decoding lastMessageID, check if it has the length of an ULID Hopefully this solves stoatchat/for-web#1556 Signed-off-by: Amelia --- src/classes/Channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/Channel.ts b/src/classes/Channel.ts index 85cd327f..f7cc1d26 100644 --- a/src/classes/Channel.ts +++ b/src/classes/Channel.ts @@ -285,7 +285,7 @@ export class Channel { * Time when the last message was sent */ get lastMessageAt(): Date | undefined { - return this.lastMessageId + return this.lastMessageId && this.lastMessageId.length === 26 ? new Date(decodeTime(this.lastMessageId)) : undefined; }