upstream: add support for @+draft/channel-context

References: https://github.com/ircv3/ircv3-specifications/pull/498
This commit is contained in:
Simon Ser 2022-06-24 11:47:27 +00:00
parent 695cd2eaa5
commit f5d57e415f

View File

@ -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)