feat: add email notification for post like
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE users DROP COLUMN IF EXISTS like_emails_enabled;
|
||||
ALTER TABLE notifications DROP COLUMN IF EXISTS like_email_sent_at;
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Aggregated like emails.
|
||||
--
|
||||
-- like_email_sent_at throttles the per-post like email: once an aggregated
|
||||
-- "X and N others liked your post" email goes out, further likes within the
|
||||
-- throttle window only update the in-app/push aggregate, not a fresh email.
|
||||
ALTER TABLE notifications ADD COLUMN IF NOT EXISTS like_email_sent_at TIMESTAMPTZ;
|
||||
|
||||
-- Per-user opt-out for like emails (push + in-app are unaffected).
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS like_emails_enabled BOOLEAN NOT NULL DEFAULT TRUE;
|
||||
Reference in New Issue
Block a user