Skip to content

Commit

Permalink
Channel::setPermissionsOverwritesAttribute fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SQKo committed Oct 30, 2022
1 parent 5003f6e commit 2a3d245
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Discord/Parts/Channel/Channel.php
Expand Up @@ -834,8 +834,7 @@ protected function setPermissionOverwritesAttribute(?array $overwrites): void
$this->attributes['permission_overwrites'] = $overwrites;

foreach ($overwrites ?? [] as $overwrite) {
$overwrite = (array) $overwrite + ['channel_id' => $this->id];
$this->overwrites->pushItem($this->factory->create(Overwrite::class, $overwrite, true));
$this->overwrites->pushItem($this->overwrites->create((array) $overwrite, true));
}
}

Expand Down

0 comments on commit 2a3d245

Please sign in to comment.