3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

Merge pull request #593 from slingamn/issue592

fix #592
This commit is contained in:
Daniel Oaks 2019-07-12 23:27:34 +10:00 committed by GitHub
commit 5cff9bb636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -388,6 +388,7 @@ func (client *Client) run(session *Session) {
session.playResume()
session.resumeDetails = nil
client.brbTimer.Disable()
client.SetAway(false, "") // clear BRB message if any
} else {
client.playReattachMessages(session)
}
@ -1109,9 +1110,10 @@ func (client *Client) destroy(session *Session) {
if quitMessage == "" {
if !brbAt.IsZero() {
awayMessage := client.AwayMessage()
if awayMessage != "" {
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
if awayMessage == "" {
awayMessage = "Disconnected" // auto-BRB
}
quitMessage = fmt.Sprintf("%s [%s ago]", awayMessage, time.Since(brbAt).Truncate(time.Second).String())
}
}
if quitMessage == "" {