diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-02-05 19:41:34 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-02-05 19:41:34 +0200 |
| commit | 0bf5515629f1cfe1557dba4f8d588ac64b77d408 (patch) | |
| tree | 2bfc56b990c6edd6bab6ddf7b10964b0efb1dbcb /query | |
| parent | 8a8c4e9abc1006da92969e0234bb2d42f587c149 (diff) | |
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
Diffstat (limited to 'query')
| -rw-r--r-- | query/notifications.sql | 6 |
1 files changed, 6 insertions, 0 deletions
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 (?, ?, ?); |
