You've already forked AstralRinth
6ee5e4df19
* feat: redirect `/hosting` to archon * feat: server invite notification type * feat: direct email notification endpoint * feat: revoke notification endpoint * feat: specify users to remove notifications from * refactor: insert notifications before sending emails * refactor: rename endpoint * refactor: remove archon redirect * style: mark field unused * feat: dedup external notifications * feat: add server invite email templates * style: remove unnecessary format --------- Co-authored-by: sychic <47618543+Sychic@users.noreply.github.com>
29 lines
1.0 KiB
SQL
29 lines
1.0 KiB
SQL
INSERT INTO notifications_types
|
|
(name, delivery_priority, expose_in_user_preferences, expose_in_site_notifications)
|
|
VALUES ('server_invite', 1, FALSE, TRUE);
|
|
|
|
INSERT INTO users_notifications_preferences (user_id, channel, notification_type, enabled)
|
|
VALUES (NULL, 'email', 'server_invite', FALSE);
|
|
|
|
INSERT INTO notifications_templates
|
|
(channel, notification_type, subject_line, body_fetch_url, plaintext_fallback)
|
|
VALUES
|
|
(
|
|
'email',
|
|
'server_invite',
|
|
'You''ve been invited to a server',
|
|
'https://modrinth.com/_internal/templates/email/server-invited',
|
|
CONCAT(
|
|
'Hi {user.name},',
|
|
CHR(10),
|
|
CHR(10),
|
|
'Modrinth user {inviter.name} has invited you to help manage {server.name} on Modrinth Hosting with the {server.role} role.',
|
|
CHR(10),
|
|
CHR(10),
|
|
'To accept or reject this invitation, open your Modrinth notifications: https://modrinth.com/dashboard/notifications',
|
|
CHR(10),
|
|
CHR(10),
|
|
'If you were not expecting this invitation, contact the server owner or reach out to Modrinth Support at https://support.modrinth.com'
|
|
)
|
|
);
|