mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-24 16:18:10 -07:00
fix #1676
Fix various pagination issues with CHATHISTORY; also undo #491 (msgid munging).
This commit is contained in:
+3
-3
@@ -862,7 +862,7 @@ func (server *Server) setupListeners(config *Config) (err error) {
|
||||
// suitable for ListCorrespondents (i.e., this function is still used to
|
||||
// decide whether the ringbuf or mysql is authoritative about the client's
|
||||
// message history).
|
||||
func (server *Server) GetHistorySequence(providedChannel *Channel, client *Client, query string) (channel *Channel, sequence history.Sequence, err error) {
|
||||
func (server *Server) GetHistorySequence(providedChannel *Channel, client *Client, query string, excludeFlags history.ExcludeFlags) (channel *Channel, sequence history.Sequence, err error) {
|
||||
config := server.Config()
|
||||
// 4 cases: {persistent, ephemeral} x {normal, conversation}
|
||||
// with ephemeral history, target is implicit in the choice of `hist`,
|
||||
@@ -940,9 +940,9 @@ func (server *Server) GetHistorySequence(providedChannel *Channel, client *Clien
|
||||
}
|
||||
|
||||
if hist != nil {
|
||||
sequence = hist.MakeSequence(correspondent, cutoff)
|
||||
sequence = hist.MakeSequence(correspondent, cutoff, excludeFlags)
|
||||
} else if target != "" {
|
||||
sequence = server.historyDB.MakeSequence(target, correspondent, cutoff)
|
||||
sequence = server.historyDB.MakeSequence(target, correspondent, cutoff, excludeFlags)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user