From 0bf5515629f1cfe1557dba4f8d588ac64b77d408 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 5 Feb 2025 19:41:34 +0200 Subject: When a user sends a message "signal" and the receiving user doesn't have the signal already open, it will be added as the first signal --- query/notifications.sql | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'query') diff --git a/query/notifications.sql b/query/notifications.sql index 5dd4d5a..72a05f1 100644 --- a/query/notifications.sql +++ b/query/notifications.sql @@ -5,3 +5,9 @@ INSERT INTO last_read_messages ( ON CONFLICT DO UPDATE SET last_read = EXCLUDED.last_read WHERE user_id = EXCLUDED.user_id AND source_id = EXCLUDED.source_id; + + +-- name: InsertLastReadMessage :exec +INSERT OR IGNORE INTO last_read_messages ( + user_id, source_id, last_read +) VALUES (?, ?, ?); -- cgit v1.3.1