summary refs log tree commit diff
path: root/src/api/util
diff options
context:
space:
mode:
authorZane Helton <zane99@me.com>2025-06-28 09:57:34 -0400
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2025-06-29 08:44:47 +1000
commite8d3f655a399a8ac5870e0d2612e2e23d87ae6b3 (patch)
tree30b60461d1fa3826efdaf310fb3841831e39d1d7 /src/api/util
parentProperly filter existing embed links (diff)
downloadserver-ts-e8d3f655a399a8ac5870e0d2612e2e23d87ae6b3.tar.xz
Preserve reactions when a message is edited
Resolves #1241
Diffstat (limited to 'src/api/util')
-rw-r--r--src/api/util/handlers/Message.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index 30fa5491..41e55000 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -46,6 +46,7 @@ import { handleFile, Permissions, normalizeUrl, + Reaction, } from "@spacebar/util"; import { HTTPError } from "lambert-server"; import { In } from "typeorm"; @@ -76,7 +77,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> { channel_id: opts.channel_id, attachments: opts.attachments || [], embeds: opts.embeds || [], - reactions: /*opts.reactions ||*/ [], + reactions: opts.reactions || [], type: opts.type ?? 0, }); @@ -436,6 +437,7 @@ interface MessageOptions extends MessageCreateSchema { webhook_id?: string; application_id?: string; embeds?: Embed[]; + reactions?: Reaction[]; channel_id?: string; attachments?: Attachment[]; edited_timestamp?: Date;