~emersion/soju-dev

Send the downstream host for PRIVMSG echo messages v1 APPLIED

delthas: 1
 Send the downstream host for PRIVMSG echo messages

 1 files changed, 3 insertions(+), 3 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/26522/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Send the downstream host for PRIVMSG echo messages Export this patch

If a downstream of prefix host `foo` sends a message, the other
downstream of prefix host `bar` should receive an echo PRIVMSG with
prefix host bar.

This fixes a regression where no prefix host was sent at all.
---
 downstream.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/downstream.go b/downstream.go
index 8389767..16e8413 100644
--- a/downstream.go
+++ b/downstream.go
@@ -581,13 +581,13 @@ func (dc *downstreamConn) handlePong(token string) {
// messages that may appear in logs are supported, except MODE messages which
// may only appear in single-upstream mode.
func (dc *downstreamConn) marshalMessage(msg *irc.Message, net *network) *irc.Message {
	msg = msg.Copy()
	msg.Prefix = dc.marshalUserPrefix(net, msg.Prefix)

	if dc.network != nil {
		return msg
	}

	msg = msg.Copy()
	msg.Prefix = dc.marshalUserPrefix(net, msg.Prefix)

	switch msg.Command {
	case "PRIVMSG", "NOTICE", "TAGMSG":
		msg.Params[0] = dc.marshalEntity(net, msg.Params[0])
-- 
2.17.1
Pushed, thanks for the fix!