From e8c021eea6865a6086c81d48d00fa79737a41843 Mon Sep 17 00:00:00 2001 From: Miikka Date: Wed, 1 Aug 2018 09:36:46 +0300 Subject: [PATCH] fix(logs): escape mentions in edit/delete logs --- src/plugins/Logs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/Logs.ts b/src/plugins/Logs.ts index 6307fbe1..f62df442 100644 --- a/src/plugins/Logs.ts +++ b/src/plugins/Logs.ts @@ -241,8 +241,8 @@ export class LogsPlugin extends Plugin { this.serverLogs.log(LogType.MESSAGE_EDIT, { member: stripObjectToScalars(msg.member, ["user"]), channel: stripObjectToScalars(msg.channel), - before: oldMsg ? oldMsg.content || "" : "Unavailable due to restart", - after: msg.content || "" + before: oldMsg ? (oldMsg.cleanContent || oldMsg.content || "") : "Unavailable due to restart", + after: msg.cleanContent || msg.content || "" }); } @@ -256,7 +256,7 @@ export class LogsPlugin extends Plugin { { member: stripObjectToScalars(msg.member, ["user"]), channel: stripObjectToScalars(msg.channel), - messageText: msg.cleanContent || "" + messageText: msg.cleanContent || msg.content || "" }, msg.id );