|
@@ -913,12 +913,14 @@ func (server *Server) GetHistorySequence(providedChannel *Channel, client *Clien
|
913
|
913
|
}
|
914
|
914
|
if config.History.Restrictions.EnforceRegistrationDate {
|
915
|
915
|
regCutoff := client.historyCutoff()
|
916
|
|
- regCutoff.Add(-time.Duration(config.History.Restrictions.GracePeriod))
|
917
|
|
- // take the earlier of the two cutoffs
|
|
916
|
+ // take the later of the two cutoffs
|
918
|
917
|
if regCutoff.After(cutoff) {
|
919
|
918
|
cutoff = regCutoff
|
920
|
919
|
}
|
921
|
920
|
}
|
|
921
|
+ if !cutoff.IsZero() {
|
|
922
|
+ cutoff = cutoff.Add(-time.Duration(config.History.Restrictions.GracePeriod))
|
|
923
|
+ }
|
922
|
924
|
if hist != nil {
|
923
|
925
|
sequence = hist.MakeSequence(recipient, cutoff)
|
924
|
926
|
} else if recipient != "" {
|