Patch lastMessage as well.

This commit is contained in:
Paul Makles
2021-01-27 15:53:29 +00:00
parent fd2b19fcef
commit 15e7b569f2
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "revolt.js",
"version": "3.0.1-beta.11",
"version": "3.0.1-beta.13",
"main": "dist/index.js",
"repository": "https://gitlab.insrt.uk/revolt/revolt.js",
"author": "Paul Makles <insrt.uk>",
+7 -4
View File
@@ -93,11 +93,14 @@ export class Client extends EventEmitter {
// Internal loopback.
this.on('message', message => {
let channel = message.channel;
if (channel instanceof DirectMessageChannel) {
if (!channel.active) {
channel.patch({ active: true });
channel.patch({
active: true,
last_message: {
_id: message.id,
author: message.author.id,
short: message.content.substr(24)
}
}
});
});
}