This commit is contained in:
Shivaram Lingamneni 2020-02-28 05:41:08 -05:00
parent c414ac383c
commit d967129446
4 changed files with 69 additions and 75 deletions

View file

@ -1563,15 +1563,18 @@ func (client *Client) historyStatus(config *Config) (status HistoryStatus, targe
}
client.stateMutex.RLock()
loggedIn := client.account != ""
target = client.account
historyStatus := client.accountSettings.DMHistory
target = client.nickCasefolded
client.stateMutex.RUnlock()
if !loggedIn {
if target == "" {
return HistoryEphemeral, ""
}
return historyEnabled(config.History.Persistent.DirectMessages, historyStatus), target
status = historyEnabled(config.History.Persistent.DirectMessages, historyStatus)
if status != HistoryPersistent {
target = ""
}
return
}
// these are bit flags indicating what part of the client status is "dirty"