|
@@ -813,16 +813,19 @@ func (channel *Channel) autoReplayHistory(client *Client, rb *ResponseBuffer, sk
|
813
|
813
|
// autoreplay any messages as necessary
|
814
|
814
|
var items []history.Item
|
815
|
815
|
|
|
816
|
+ hasAutoreplayTimestamps := false
|
816
|
817
|
var start, end time.Time
|
817
|
818
|
if rb.session.zncPlaybackTimes.ValidFor(channel.NameCasefolded()) {
|
|
819
|
+ hasAutoreplayTimestamps = true
|
818
|
820
|
start, end = rb.session.zncPlaybackTimes.start, rb.session.zncPlaybackTimes.end
|
819
|
821
|
} else if !rb.session.autoreplayMissedSince.IsZero() {
|
820
|
822
|
// we already checked for history caps in `playReattachMessages`
|
|
823
|
+ hasAutoreplayTimestamps = true
|
821
|
824
|
start = time.Now().UTC()
|
822
|
825
|
end = rb.session.autoreplayMissedSince
|
823
|
826
|
}
|
824
|
827
|
|
825
|
|
- if !start.IsZero() || !end.IsZero() {
|
|
828
|
+ if hasAutoreplayTimestamps {
|
826
|
829
|
_, seq, _ := channel.server.GetHistorySequence(channel, client, "")
|
827
|
830
|
if seq != nil {
|
828
|
831
|
zncMax := channel.server.Config().History.ZNCMax
|