upstream: use unspecified AWAY reason if possible

This commit is contained in:
Simon Ser 2023-11-12 16:37:46 +01:00
parent 5ae86d69cc
commit d354a30b43

View File

@ -2191,9 +2191,13 @@ func (uc *upstreamConn) updateAway() {
return return
} }
if away { if away {
reason := "Auto away"
if uc.caps.IsAvailable("draft/pre-away") {
reason = "*"
}
uc.SendMessage(ctx, &irc.Message{ uc.SendMessage(ctx, &irc.Message{
Command: "AWAY", Command: "AWAY",
Params: []string{"Auto away"}, Params: []string{reason},
}) })
} else { } else {
uc.SendMessage(ctx, &irc.Message{ uc.SendMessage(ctx, &irc.Message{