Skip to content

Commit

Permalink
Skip notification, if we dont have this channel.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostzero committed Nov 11, 2020
1 parent c85414a commit c5907eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Messages/NoticeMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ public function __construct(string $message)

public function handle(Client $client, array $channels): array
{
if (array_key_exists($this->commandSuffix, $channels)) {
$this->channel = $channels[$this->commandSuffix];
if (!array_key_exists($this->commandSuffix, $channels)) {
return [];
}

$this->channel = $channels[$this->commandSuffix];
$msgId = $this->tags['msg-id'] ?? '';
$events = [
new NoticeEvent($this->channel, $msgId),
Expand Down

0 comments on commit c5907eb

Please sign in to comment.