Remove the CHATHISTORY * and znc.in/playback *self targets,
clean up associated database code, add new mechanisms to play
all missed DMs.
This commit is contained in:
Shivaram Lingamneni 2021-04-19 08:54:40 -04:00
parent d2278faf75
commit 0d05ab4ff4
6 changed files with 87 additions and 64 deletions

View file

@ -862,6 +862,10 @@ func (server *Server) setupListeners(config *Config) (err error) {
// we may already know the channel we're querying, or we may have
// to look it up via a string query. This function is responsible for
// privilege checking.
// XXX: call this with providedChannel==nil and query=="" to get a sequence
// 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) {
config := server.Config()
// 4 cases: {persistent, ephemeral} x {normal, conversation}
@ -901,7 +905,7 @@ func (server *Server) GetHistorySequence(providedChannel *Channel, client *Clien
}
} else {
status, target = client.historyStatus(config)
if query != "*" {
if query != "" {
correspondent, err = CasefoldName(query)
if err != nil {
return