3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

fix(logs): escape mentions in edit/delete logs

This commit is contained in:
Miikka 2018-08-01 09:36:46 +03:00 committed by GitHub
parent f77e70d4d2
commit e8c021eea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
);