feat(Message): add messageEditHistoryMaxSize to limit stored msg edits (#4867)

This commit is contained in:
Matt (IPv4) Cowley
2020-10-17 14:34:49 +01:00
committed by GitHub
parent 4a6fb9a7d4
commit c412cd7521
5 changed files with 23 additions and 5 deletions

View File

@@ -9,9 +9,9 @@ class MessageUpdateAction extends Action {
const { id, channel_id, guild_id, author, timestamp, type } = data;
const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel);
if (message) {
message.patch(data);
const old = message.patch(data);
return {
old: message._edits[0],
old,
updated: message,
};
}