[PATCH] upstream: add support for @+draft/channel-context
Export this patch
References: https://github.com/ircv3/ircv3-specifications/pull/498
---
upstream.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/upstream.go b/upstream.go
index 2e3bd6b3eb47..71d3ef353689 100644
--- a/upstream.go
+++ b/upstream.go
@@ -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)
base-commit: ca3557d9effa8a619094d2567a702f0c524f0509
--
2.36.1
Hm, not sure this is such a great idea with the FS message store. The
tags will be stripped and then clients will be confused.