Skip to content

Commit

Permalink
Fix channels created for file events via DM - #571
Browse files Browse the repository at this point in the history
We only call getMessageChannel() when .showonlyjoined and it's not a
direct message. getMessageChannel() creates a channel in IRC.
  • Loading branch information
hloeung committed Feb 12, 2024
1 parent b762e5e commit 90894e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm-go-irckit/userbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ func (u *User) handleChannelMessageEvent(event *bridge.ChannelMessageEvent) {
}

func (u *User) handleFileEvent(event *bridge.FileEvent) {
ch := u.getMessageChannel(event.ChannelID, event.Sender)
if event.ChannelType != "D" && ch.ID() == "&messages" {
if u.v.GetBool(u.br.Protocol() + ".showonlyjoined") {
if u.v.GetBool(u.br.Protocol() + ".showonlyjoined") && event.ChannelType != "D" {

Check failure on line 350 in mm-go-irckit/userbridge.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofmt`-ed with `-s` (gofmt)
ch := u.getMessageChannel(event.ChannelID, event.Sender)
if ch.ID() == "&messages" {
return
}
}
Expand Down

0 comments on commit 90894e2

Please sign in to comment.