[PATCH v1] Fix echo-message for TAGMSG
Export this patch
A previous fix [1] only fixed sending echo-message for TAGMSG to self.
We also need to send echo-message for TAGMSG to other targets.
Fixes: https://todo.sr.ht/~emersion/soju/111
[1]: d4b7bb02da1c
---
downstream.go | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/downstream.go b/downstream.go
index a52b1ad..b5caa8c 100644
--- a/downstream.go
+++ b/downstream.go
@@ -2434,6 +2434,19 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
Params: []string{upstreamName},
})
+ echoTags := tags.Copy()
+ echoTags["time"] = irc.TagValue(time.Now().UTC().Format(serverTimeLayout))
+ if uc.account != "" {
+ echoTags["account"] = irc.TagValue(uc.account)
+ }
+ echoMsg := &irc.Message{
+ Tags: echoTags,
+ Prefix: &irc.Prefix{Name: uc.nick},
+ Command: "TAGMSG",
+ Params: []string{upstreamName},
+ }
+ uc.produce(upstreamName, echoMsg, dc)
+
uc.updateChannelAutoDetach(upstreamName)
}
case "INVITE":
base-commit: b1a83529e165014b5e002a812a1d83fe92ad181a
--
2.17.1
Pushed, thanks for the fix!