Skip to content

Commit

Permalink
upstream: add support for @+draft/channel-context
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Jun 28, 2022
1 parent 695cd2e commit f5d57e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
if uc.isOurNick(target) {
bufferName = msg.Prefix.Name
}
if t, ok := msg.Tags["+draft/channel-context"]; ok {
ch := uc.channels.Get(string(t))
if ch != nil && ch.Members.Has(msg.Prefix.Name) {
bufferName = ch.Name
}
}

self := uc.isOurNick(msg.Prefix.Name)

Expand Down

0 comments on commit f5d57e4

Please sign in to comment.