Skip to content

Commit 5f7b13d

Browse files
committed
Fix channel selection logic
Currently the bot won't send anything if it's not in ANY of the channels the message is meant to go to. Fix by intersecting message destination channels with channels the bot is in and sending the message to those.
1 parent dd458f0 commit 5f7b13d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Geth/Plugin/GitHub.pm6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ method irc-started {
4343

4444
dd [ 'chans', @chans, @bot-chans, @chans @bot-chans ];
4545

46-
if @chans @bot-chans {
46+
if keys @chans @bot-chans -> @send-to-chans {
4747
my $text = make-text $e;
48-
for @chans -> $where {
48+
for @send-to-chans -> $where {
4949
for $text.lines -> $text {
5050
throttle { $.irc.send: :$where, :$text }
5151
}

0 commit comments

Comments
 (0)