From 70fa63858ae4154fd761500e3237e6687019700b Mon Sep 17 00:00:00 2001 From: emerson Date: Tue, 11 Jul 2023 14:57:57 -0400 Subject: [PATCH] make sure all messages have a time tag --- src/irc/IRCMessage.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/irc/IRCMessage.ts b/src/irc/IRCMessage.ts index 30141df..9199d07 100644 --- a/src/irc/IRCMessage.ts +++ b/src/irc/IRCMessage.ts @@ -122,5 +122,9 @@ export function parseIRCMessage(rawLine: string) { params.push(lastParam); } + if (!parsedTags.has('time')) { + parsedTags.set('time', new Date().toISOString()) + } + return new IRCMessage(parsedTags, prefix, command, params); } \ No newline at end of file -- 2.45.2