mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-06 10:52:31 +01:00
reactions rights enforcement
This commit is contained in:
parent
7278c66203
commit
f27afe0c56
@ -4,8 +4,9 @@ import { route } from "@fosscord/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
// TODO: check if message exists
|
||||
// TODO: public read receipts & privacy scoping
|
||||
// TODO: send read state event to all channel members
|
||||
// TODO: advance-only notification cursor
|
||||
|
||||
export interface MessageAcknowledgeSchema {
|
||||
manual?: boolean;
|
||||
|
@ -101,7 +101,7 @@ router.get("/:emoji", route({ permission: "VIEW_CHANNEL" }), async (req: Request
|
||||
res.json(users);
|
||||
});
|
||||
|
||||
router.put("/:emoji/:user_id", route({ permission: "READ_MESSAGE_HISTORY" }), async (req: Request, res: Response) => {
|
||||
router.put("/:emoji/:user_id", route({ permission: "READ_MESSAGE_HISTORY", right: "SELF_ADD_REACTIONS" }), async (req: Request, res: Response) => {
|
||||
const { message_id, channel_id, user_id } = req.params;
|
||||
if (user_id !== "@me") throw new HTTPError("Invalid user");
|
||||
const emoji = getEmoji(req.params.emoji);
|
||||
|
Loading…
Reference in New Issue
Block a user