mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #1615
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:
parent
d2278faf75
commit
0d05ab4ff4
6 changed files with 87 additions and 64 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue