From 866f1874b130b18a1daa389d4b342b037f1e3911 Mon Sep 17 00:00:00 2001 From: Il Harper Date: Fri, 26 Apr 2024 14:43:09 +0800 Subject: [PATCH] feat(shell): logger: `logiriMessageCreated()` adapt fm --- packages/shell/src/services/logger/logiri.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/shell/src/services/logger/logiri.ts b/packages/shell/src/services/logger/logiri.ts index 801ec90..95f4803 100644 --- a/packages/shell/src/services/logger/logiri.ts +++ b/packages/shell/src/services/logger/logiri.ts @@ -6,8 +6,9 @@ import { blue, cyan, grey } from '../../utils/colors' export const logiriMessageCreated = async (data: object) => { const d = data as Event if (d.type !== 'message-created') return - const messages = await new LogiriMessager().send(d.message?.content) - return messages.map( + const rawMessage = await new LogiriMessager().send(d.message?.content) + const message = rawMessage.join('').replace(/\r/g, '').replace(/\n/g, ' ') + return [message].map( (x) => `${blue( link(