~emersion/soju-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Fix saving `+draft/react` is msgstores

Details
Message ID
<20231025143941.119166-1-pounce@integraldoma.in>
DKIM signature
missing
Download raw message
Patch: +4 -3
This commit fixes a bug where only TAGMSGs with a `+react` tag would be
stored, when a `+draft/react` tag is normative. I have kept messages
containing `+react` as well, as they will most likely be used in the
future.

I have also reversed the order of tag inspection, as I found the new
order to be more readable.
---
 upstream.go | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/upstream.go b/upstream.go
index 80f0517..5bffe3d 100644
--- a/upstream.go
+++ b/upstream.go
@@ -49,7 +49,8 @@ var permanentUpstreamCaps = map[string]bool{
// storableMessageTags is the static list of message tags that will cause
// a TAGMSG to be stored.
var storableMessageTags = map[string]bool{
	"+react": true,
	"+draft/react": true,
	"+react":       true,
}

type registrationError struct {
@@ -2099,8 +2100,8 @@ func (uc *upstreamConn) appendLog(entity string, msg *irc.Message) (msgID string
	}
	if msg.Command == "TAGMSG" {
		store := false
		for tag := range storableMessageTags {
			if _, ok := msg.Tags[tag]; ok {
		for tag := range msg.Tags {
			if storableMessageTags[tag] {
				store = true
				break
			}
-- 
2.42.0
Details
Message ID
<8pa6l_N_qzgkpYhxx6JmUTPcPbnQcwj5Qo9LwZqKd6HL0Eu8ZJs1f5LrvjfOx7Vu7fJGINoKoZi2nNDXqFu6SnV_vlJFGYRyoN-KY7STr1M=@emersion.fr>
In-Reply-To
<20231025143941.119166-1-pounce@integraldoma.in> (view parent)
DKIM signature
missing
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)