Page history by message id (closes #125)
check / check (push) Canceled after 0s

GET /api/v1/history took a database id for before, but history
responses carry only each message's id, so a client had nothing to
pass for the next page. before now takes that id: the server finds
the message among those sent to the target and returns the page
older than it. An id with no such message gets 400 "unknown before
id" instead of a silent full page. A handler test pages back through
a channel using only ids from earlier responses, and README.md's
history section describes the new parameter.

Model: opus-5-5
This commit is contained in:
2026-10-20 09:39:27 +00:00
parent 7c6f0bc01e
commit e59406fb43
5 changed files with 205 additions and 17 deletions
+1 -1
View File
@@ -721,7 +721,7 @@ func TestGetHistory(t *testing.T) {
const histLimit = 5
msgs, err := database.GetHistory(
ctx, "#hist", 0, histLimit,
ctx, "#hist", "", histLimit,
)
if err != nil {
t.Fatal(err)