memos/store/db/postgres
Steven d1492007ab fix(store): filter inbox notifications by message type at database level
Add MessageType filter to FindInbox to exclude legacy VERSION_UPDATE
notifications from inbox queries. This resolves the issue where users
saw notification counts but no items displayed, as VERSION_UPDATE
entries cannot be rendered in the new UserNotification API.

Changes:
- Add MessageType field to FindInbox struct for database-level filtering
- Implement JSON extraction filters in SQLite, MySQL, and PostgreSQL drivers
- Update ListUserNotifications to filter MEMO_COMMENT type at store level

This approach improves performance by filtering at the database rather
than in application code, reducing unnecessary data transfer for users
with many legacy inbox entries.

Fixes #5278

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:43:05 +08:00
..
activity.go chore: fix postgres stmts 2024-01-05 21:27:16 +08:00
attachment.go fix(store): correct PostgreSQL placeholder generation in IN clauses 2025-10-25 06:47:06 +08:00
common.go chore: fix postgres stmts 2024-01-05 21:27:16 +08:00
idp.go fix: create idp in postgres 2024-05-29 23:22:20 +08:00
inbox.go fix(store): filter inbox notifications by message type at database level 2025-12-01 08:43:05 +08:00
instance_setting.go refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00
memo.go fix(store): correct PostgreSQL placeholder generation in IN clauses 2025-10-25 06:47:06 +08:00
memo_filter_test.go fix(postgres): update tag filtering SQL to ensure proper type casting for LIKE comparisons 2025-11-26 23:04:07 +08:00
memo_relation.go refactor: memo filter 2025-10-16 09:22:52 +08:00
migration_history.go refactor: update migration history methods 2025-10-20 23:05:50 +08:00
postgres.go chore: fix linter 2025-06-15 10:27:24 +08:00
reaction.go fix(security): implement security review recommendations (#5228) 2025-11-06 23:32:27 +08:00
user.go refactor: memo filter 2025-10-16 09:22:52 +08:00
user_setting.go refactor: general user setting 2025-06-23 23:23:57 +08:00