mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-21 04:25:27 -04:00
Patch lastMessage as well.
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user