forked from Galactic/modmail
bugfix
This commit is contained in:
parent
2892fd0f04
commit
3c3ea9d90d
@ -13,6 +13,7 @@ Contributions welcome.
|
|||||||
> Create a named volume `docker volume create ModmailStorage`
|
> Create a named volume `docker volume create ModmailStorage`
|
||||||
Make sure to have a config.js ready to go, see the example file for a template
|
Make sure to have a config.js ready to go, see the example file for a template
|
||||||
> Start the container
|
> Start the container
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d --name modmail \
|
docker run -d --name modmail \
|
||||||
-v /path/to/config.js:/modmail/config.js \
|
-v /path/to/config.js:/modmail/config.js \
|
||||||
|
@ -92,7 +92,7 @@ class ChannelHandler {
|
|||||||
if (channel) await channel.edit({ parentID: state === 'read' ? this.readMail.id : this.newMail.id, lockPermissions: true });
|
if (channel) await channel.edit({ parentID: state === 'read' ? this.readMail.id : this.newMail.id, lockPermissions: true });
|
||||||
if (!this.cache.updatedThreads.includes(target)) this.cache.updatedThreads.push(target);
|
if (!this.cache.updatedThreads.includes(target)) this.cache.updatedThreads.push(target);
|
||||||
if (this.cache.queue.includes(target) && state === 'read') this.cache.queue.splice(this.cache.queue.indexOf(target), 1);
|
if (this.cache.queue.includes(target) && state === 'read') this.cache.queue.splice(this.cache.queue.indexOf(target), 1);
|
||||||
else if (!this.cache.queue.includes(target)) this.cache.queue.push(target);
|
else if (!this.cache.queue.includes(target) && state === 'unread') this.cache.queue.push(target);
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -362,7 +362,6 @@ class Modmail {
|
|||||||
response = await this.channels.setReadState(userId, channel, author, state);
|
response = await this.channels.setReadState(userId, channel, author, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (response.error) return response;
|
if (response.error) return response;
|
||||||
this.log({ author, action: `${author.tag} marked ${user.tag}'s thread as ${state}`, target: user });
|
this.log({ author, action: `${author.tag} marked ${user.tag}'s thread as ${state}`, target: user });
|
||||||
return 'Done';
|
return 'Done';
|
||||||
|
Loading…
Reference in New Issue
Block a user