From f9a11db153d6e33bebb136ef875cdeed3254603d Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 20 Mar 2026 04:12:49 +0000 Subject: [PATCH] fix (*SQLite).ListChannels If the final channel we attempted to list had no messages, sql.ErrNoRows would be returned as the error for the entire function, which would prevent any channels from appearing in the targets list. --- irc/sqlite/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/sqlite/history.go b/irc/sqlite/history.go index 2971d039..8737c15c 100644 --- a/irc/sqlite/history.go +++ b/irc/sqlite/history.go @@ -998,7 +998,7 @@ func (s *SQLite) ListChannels(cfchannels []string) (results []history.TargetList results = make([]history.TargetListing, 0, len(cfchannels)) for _, chname := range cfchannels { var nanotime int64 - err = s.selectChannelTime.QueryRowContext(ctx, chname).Scan(&nanotime) + err := s.selectChannelTime.QueryRowContext(ctx, chname).Scan(&nanotime) if err == sql.ErrNoRows { continue // channel has no messages, skip it }