aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-08-05 13:44:20 +0200
committerGitHub <noreply@github.com>2022-08-05 13:44:20 +0200
commitcecd11be9a44ff93bd846fdd4b40a4dcd41f9f70 (patch)
tree6a54197674374095876ad8a0ae76bd73b4690bf9 /syncapi/storage/postgres
parent2a1df0129e43e09421b32b0961225dab61e31703 (diff)
Partly fix notification counts (#2621)
* Fix notification query * Also for SQLite * Move tests to whitelist * Revert "Move tests to whitelist" This reverts commit a7d0120019a111ce45a447ba40233d9c101e6e9b.
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r--syncapi/storage/postgres/notification_data_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/notification_data_table.go b/syncapi/storage/postgres/notification_data_table.go
index f3fc4451..9cd8b736 100644
--- a/syncapi/storage/postgres/notification_data_table.go
+++ b/syncapi/storage/postgres/notification_data_table.go
@@ -58,7 +58,7 @@ const upsertRoomUnreadNotificationCountsSQL = `INSERT INTO syncapi_notification_
(user_id, room_id, notification_count, highlight_count)
VALUES ($1, $2, $3, $4)
ON CONFLICT (user_id, room_id)
- DO UPDATE SET notification_count = $3, highlight_count = $4
+ DO UPDATE SET id = nextval('syncapi_notification_data_id_seq'), notification_count = $3, highlight_count = $4
RETURNING id`
const selectUserUnreadNotificationCountsSQL = `SELECT