/away: Fix output for admin whois

cc #377
This commit is contained in:
Andrey Petrov 2021-04-13 11:27:38 -04:00
parent 9bf66ea992
commit badcaa6e3b
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ func (i Identity) WhoisAdmin(room *chat.Room) string {
if member, ok := room.MemberByID(i.ID()); ok {
// Add room-specific whois
if isAway, awaySince, awayMessage := member.GetAway(); isAway {
fmt.Fprintf(&out, message.Newline+" > away: (%s ago) %s", humantime.Since(awaySince), awayMessage)
}
// FIXME: Should these always be present, even if they're false? Maybe
// change that once we add room context to Whois() above.
if !member.LastMsg().IsZero() {