mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-22 17:32:30 +00:00
is it a hack if it works?
This commit is contained in:
1 parent
85d09bd445
commit
8bf62e1f57
3 files changed
+32
-3
No files matched your search
@@ -91,7 +91,7 @@ router.post("/", route({}), async (req: Request, res: Response) => {
|
||||
}
|
||||
|
||||
if (body.type === InteractionType.MessageComponent || body.data.type === InteractionType.ModalSubmit) {
|
||||
interactionData.message = await Message.findOneOrFail({ where: { id: body.message_id }, relations: ["author"] });
|
||||
interactionData.message = await Message.findOneOrFail({ where: { id: body.message_id, flags: undefined }, relations: ["author"] });
|
||||
}
|
||||
|
||||
emitEvent({
|
||||
|
||||
@@ -530,7 +530,7 @@ export async function sendMessage(opts: MessageOptions) {
|
||||
|
||||
const ephermal = (message.flags & (1 << 6)) !== 0;
|
||||
await Promise.all([
|
||||
ephermal ? null : Message.insert(message),
|
||||
Message.insert(message),
|
||||
emitEvent({
|
||||
event: "MESSAGE_CREATE",
|
||||
...(ephermal ? { user_id: message.interaction_metadata?.user_id } : { channel_id: message.channel_id }),
|
||||
|
||||
Reference in new issue
Block a user