data/removeMessage: no need for additional model instantiation
This commit is contained in:
@@ -249,8 +249,7 @@ async function removeMessage(id, { Message }) {
|
|||||||
// it needs to delete all associated on-disk files along with the database delete.
|
// it needs to delete all associated on-disk files along with the database delete.
|
||||||
if (message) {
|
if (message) {
|
||||||
await channels.removeMessage(id);
|
await channels.removeMessage(id);
|
||||||
const model = new Message(message);
|
await message.cleanup();
|
||||||
await model.cleanup();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user