fix(Message): Fix permissions check in locked threads (#9338)

fix(Message#editable): fix permissions check if channel is thread & locked

Co-authored-by: Erwan <erwan977@gmail.com>
This commit is contained in:
Jiralite 2023-04-07 13:26:16 +01:00 committed by GitHub
parent 09ca243c2f
commit a8d5325def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -605,7 +605,7 @@ class Message extends Base {
if (this.channel?.isThread()) {
if (this.channel.archived) return false;
if (this.channel.locked) {
const permissions = this.permissionsFor(this.client.user);
const permissions = this.channel.permissionsFor(this.client.user);
if (!permissions?.has(Permissions.FLAGS.MANAGE_THREADS, true)) return false;
}
}