fix(passwd): tell members to reconnect chat after a reset

The Lounge / an IRC client caches the SASL password for an active connection, so
a password change only takes effect after the client reconnects. Without a hint
this looks like "I reset my password but chat still fails". passwd@ now prints a
reminder to /connect (or sign out/in) at chat.<domain> when the chat leg ran.
This commit is contained in:
Anthony Ettinger 2026-06-27 16:46:56 +00:00
parent a69d702ea4
commit 35134a51cb

View file

@ -1937,6 +1937,13 @@ func (a *app) handlePasswd(s ssh.Session) {
if len(ok) == 0 && len(failed) == 0 {
wish.Println(s, " (no password-backed services are configured on this server)")
}
if a.irc.Configured() {
// An already-open web/IRC client keeps using the OLD SASL password until
// it reconnects, so a change here looks like it "didn't work" mid-session.
wish.Println(s, "")
wish.Println(s, " ↻ chat: if you're already connected at chat."+rootDomain(a.host)+
", reconnect (/connect) or sign out and back in to pick up the new password.")
}
_, _ = a.st.RecordSession(u.ID, s.User(), remoteIP(s), "passwd")