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.
8 строки
254 B
SQL
8 строки
254 B
SQL
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); |