forked from External/ergo
change "last signoff" tracking to "last seen"
Explicit quit and ping timeout behave the same way, but reattach after abandoning/losing the previous session (without the break being detected server-side) is more aggressive about replaying missed messages, at the cost of potential duplication.
This commit is contained in:
parent
e575b6a29f
commit
db39608bcb
7 changed files with 78 additions and 91 deletions
|
|
@ -775,9 +775,9 @@ func (channel *Channel) autoReplayHistory(client *Client, rb *ResponseBuffer, sk
|
|||
var after, before time.Time
|
||||
if rb.session.zncPlaybackTimes != nil && (rb.session.zncPlaybackTimes.targets == nil || rb.session.zncPlaybackTimes.targets.Has(channel.NameCasefolded())) {
|
||||
after, before = rb.session.zncPlaybackTimes.after, rb.session.zncPlaybackTimes.before
|
||||
} else if !rb.session.lastSignoff.IsZero() {
|
||||
} else if !rb.session.autoreplayMissedSince.IsZero() {
|
||||
// we already checked for history caps in `playReattachMessages`
|
||||
after = rb.session.lastSignoff
|
||||
after = rb.session.autoreplayMissedSince
|
||||
}
|
||||
|
||||
if !after.IsZero() || !before.IsZero() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue