Hackathon: Post Reminders (#20555)
This PR adds the post reminder backend work. We add a new API endpoint via which a user can set a reminder for a post. An ephemeral message will be sent down the line to let the user know about the action. And then after the time is over, the system admin bot will send a DM message to the user about the reminder post.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e6459b97de
Коммит
20cb042362
3
db/migrations/postgres/000091_create_post_reminder.down.sql
Обычный файл
3
db/migrations/postgres/000091_create_post_reminder.down.sql
Обычный файл
@@ -0,0 +1,3 @@
|
||||
DROP INDEX IF EXISTS idx_postreminders_targettime;
|
||||
|
||||
DROP TABLE IF EXISTS postreminders;
|
||||
8
db/migrations/postgres/000091_create_post_reminder.up.sql
Обычный файл
8
db/migrations/postgres/000091_create_post_reminder.up.sql
Обычный файл
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE IF NOT EXISTS postreminders (
|
||||
postid varchar(26) NOT NULL,
|
||||
userid varchar(26) NOT NULL,
|
||||
targettime bigint,
|
||||
PRIMARY KEY (postid, userid)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_postreminders_targettime ON postreminders(targettime);
|
||||
Ссылка в новой задаче
Block a user