data/removeMessage: no need for additional model instantiation
This commit is contained in:
parent
02fbea96c0
commit
57d13dad57
1 changed files with 1 additions and 2 deletions
|
@ -249,8 +249,7 @@ async function removeMessage(id, { Message }) {
|
|||
// it needs to delete all associated on-disk files along with the database delete.
|
||||
if (message) {
|
||||
await channels.removeMessage(id);
|
||||
const model = new Message(message);
|
||||
await model.cleanup();
|
||||
await message.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue