~emersion/soju-dev

downstream: fix inverted range in CHATHISTORY LATEST with a timestamp v1 APPLIED

Petr Ročkai: 1
 downstream: fix inverted range in CHATHISTORY LATEST with a timestamp

 1 files changed, 3 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/34539/mbox | git am -3
Learn more about email & git

[PATCH] downstream: fix inverted range in CHATHISTORY LATEST with a timestamp Export this patch

---
 downstream.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/downstream.go b/downstream.go
index 6336eed..7d29af3 100644
--- a/downstream.go
+++ b/downstream.go
@@ -2913,8 +2913,10 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.

		var history []*irc.Message
		switch subcommand {
		case "BEFORE", "LATEST":
		case "BEFORE":
			history, err = store.LoadBeforeTime(ctx, bounds[0], time.Time{}, &options)
		case "LATEST":
			history, err = store.LoadBeforeTime(ctx, time.Now(), bounds[0], &options)
		case "AFTER":
			history, err = store.LoadAfterTime(ctx, bounds[0], time.Now(), &options)
		case "BETWEEN":
-- 
2.35.1
Yup, good catch, this LGTM. Pushed, thanks!