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
1 changed files with 5 additions and 1 deletions

View File

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