Fix labeled-response without downstream echo-message
Previously, receiving labeled responses to messages sent from a downstream without echo-message would fail, because soju would filter out the responses under the assumption that it was an echoed message. Only do this filtering when msg.Prefix.Name != uc.nick in order to avoid this issue.
This commit is contained in:
parent
f4af7975d3
commit
aee65cd269
@ -2172,7 +2172,8 @@ func (uc *upstreamConn) produce(target string, msg *irc.Message, originID uint64
|
||||
detached := ch != nil && ch.Detached
|
||||
|
||||
uc.forEachDownstream(func(dc *downstreamConn) {
|
||||
if !detached && (dc.id != originID || dc.caps.IsEnabled("echo-message")) {
|
||||
echo := dc.id == originID && msg.Prefix != nil && uc.isOurNick(msg.Prefix.Name)
|
||||
if !detached && (!echo || dc.caps.IsEnabled("echo-message")) {
|
||||
dc.sendMessageWithID(dc.marshalMessage(msg, uc.network), msgID)
|
||||
} else {
|
||||
dc.advanceMessageWithID(msg, msgID)
|
||||
|
Loading…
Reference in New Issue
Block a user