From 93c28c7d9d8ce2e18ffae6f6477cf4e89fc8ec12 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 30 Dec 2025 14:21:30 -0500 Subject: [PATCH] fixes --- irc/client.go | 2 +- irc/history/database.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/irc/client.go b/irc/client.go index 604b0388..bf150d82 100644 --- a/irc/client.go +++ b/irc/client.go @@ -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) diff --git a/irc/history/database.go b/irc/history/database.go index b09d882f..3ec44ea4 100644 --- a/irc/history/database.go +++ b/irc/history/database.go @@ -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)