This commit is contained in:
Shivaram Lingamneni 2025-12-30 14:21:30 -05:00
parent bd4eda0638
commit 93c28c7d9d
2 changed files with 7 additions and 6 deletions

View file

@ -1822,7 +1822,7 @@ func (client *Client) listTargets(start, end time.Time, limit int) (results []hi
}
if cErr != nil {
base = nil
client.server.logger.Error("history", "could not list correspondents", err.Error())
client.server.logger.Error("history", "could not list correspondents", cErr.Error())
}
results = history.MergeTargets(base, extras, start, end, limit)

View file

@ -23,19 +23,20 @@ type Database interface {
AddDirectMessage(sender, senderAccount, recipient, recipientAccount string, item Item) error
// DeleteMsgid deletes a message by its msgid.
// accountName is the unfolded account name, or "*" for no account.
// accountName is the unfolded account name, or "*" to skip
// account validation
DeleteMsgid(msgid, accountName string) error
// ListChannels returns the timestamp of the latest message in each
// of the given channels (specified as casefolded names).
ListChannels(cfchannels []string) (results []TargetListing, err error)
// MakeSequence creates a Sequence for querying history.
// target is the primary target (channel or account), casefolded.
// correspondent is the casefolded DM correspondent (empty for channels).
// cutoff is the earliest time to include in results.
MakeSequence(target, correspondent string, cutoff time.Time) Sequence
// ListChannels returns the timestamp of the latest message in each
// of the given channels (specified as casefolded names).
ListChannels(cfchannels []string) (results []TargetListing, err error)
// ListCorrespondents lists the DM correspondents associated with an account,
// in order to implement CHATHISTORY TARGETS.
ListCorrespondents(cftarget string, start, end time.Time, limit int) ([]TargetListing, error)