reactions rights enforcement
This commit is contained in:
parent
0b37c83dce
commit
e2b27a8d2c
@ -4,8 +4,9 @@ import { route } from "@fosscord/api";
|
|||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
// TODO: check if message exists
|
// TODO: public read receipts & privacy scoping
|
||||||
// TODO: send read state event to all channel members
|
// TODO: send read state event to all channel members
|
||||||
|
// TODO: advance-only notification cursor
|
||||||
|
|
||||||
export interface MessageAcknowledgeSchema {
|
export interface MessageAcknowledgeSchema {
|
||||||
manual?: boolean;
|
manual?: boolean;
|
||||||
|
@ -101,7 +101,7 @@ router.get("/:emoji", route({ permission: "VIEW_CHANNEL" }), async (req: Request
|
|||||||
res.json(users);
|
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;
|
const { message_id, channel_id, user_id } = req.params;
|
||||||
if (user_id !== "@me") throw new HTTPError("Invalid user");
|
if (user_id !== "@me") throw new HTTPError("Invalid user");
|
||||||
const emoji = getEmoji(req.params.emoji);
|
const emoji = getEmoji(req.params.emoji);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user