~emersion/soju-dev

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

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

 1 files changed, 6 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/33254/mbox | git am -3
Learn more about email & git

[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.