diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-09-06 20:41:52 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-09-12 11:11:15 +0200 |
commit | a3ae62afd2eecb3831e2483f94d2db6a1d6bb748 (patch) | |
tree | afab182f51b3769feb6c060a48e65513d09c7425 /schema.sql | |
parent | cce4df5b31627482ca1ce595223e4ae02800f0dc (diff) | |
download | server-a3ae62afd2eecb3831e2483f94d2db6a1d6bb748.tar.gz |
Notification system improvements.
Enable webhook notification support with .env WEBHOOKS=1
Send notifications when invited to a game.
Use notification "too soon" logic for webhooks as well.
Try sending webhooks 3 times before giving up.
Check if player is on the join page instead of the funky "offline" check
when sending "your game is ready" notification.
Only show mail/webhook notification settings if they are enabled.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -422,7 +422,6 @@ create view your_turn_reminder as status = 1 and active in ('All', 'Both', role) and is_solo = 0 - and notify = 1 and julianday() > julianday(mtime, '+1 hour') ; @@ -439,6 +438,17 @@ create view your_turn as and active in ('All', 'Both', role) ; +drop view if exists invite_reminder; +create view invite_reminder as + select + game_id, role, user_id, name, mail, notify + from + players + join users using(user_id) + where + is_invite = 1 + ; + -- Trigger to remove game data when filing a game as archived drop trigger if exists trigger_archive_game; |