diff --git a/downstream.go b/downstream.go index 46573c0..10a12be 100644 --- a/downstream.go +++ b/downstream.go @@ -155,15 +155,15 @@ func isOurNick(net *network, nick string) bool { // This involves adding a "/" suffix if the entity isn't the current // user. func (dc *downstreamConn) marshalEntity(net *network, name string) string { + if isOurNick(net, name) { + return dc.nick + } if dc.network != nil { if dc.network != net { panic("soju: tried to marshal an entity for another network") } return name } - if isOurNick(net, name) { - return dc.nick - } return name + "/" + net.GetName() }