Post by @littlefedi_official
@littlefedi_official@littleone.littlefedi.social Hi! Not sure if this is the right place to direct this, but I've noticed the "Mark as read" in the Catch-up tab has always returned an error for me. I had a little look into the logs, and it's a PostgreSQL-specific issue due to ambiguous matching of the version field. I have a very simple patch I now apply to my build which solves it for me. Hope it's helpful!
diff --git a/internal/storage/bun.go b/internal/storage/bun.go
index 7a1ae89..34ce77e 100644
--- a/internal/storage/bun.go
+++ b/internal/storage/bun.go
@@ -4101,7 +4101,7 @@ func (s *bunStorage) SetMarker(ctx context.Context, accountID, timeline, lastRea
VALUES (?, ?, ?, 1, ?)
ON CONFLICT (account_id, timeline) DO UPDATE SET
last_read_id = excluded.last_read_id,
- version = version + 1,
+ version = markers.version + 1,
updated_at = excluded.updated_at`,
accountID, timeline, lastReadID, now); err != nil {
return nil, err
@stephen@fedi.s-n.me Thank you! Yes, the patch is correct. We've patched the source and will be a part of the next build.