Fix not properly marshaling self in single-server mode
In single-server mode, we don't need to add a /network suffix when marshaling, but we still need to replace our nick with the downstream nick.
This commit is contained in:
parent
1363a5c27e
commit
40ee5e8405
@ -155,15 +155,15 @@ func isOurNick(net *network, nick string) bool {
|
||||
// This involves adding a "/<network>" 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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user