1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-09 20:22:47 +01:00

Allow edited_timestamp to passthrough in handleMessage

This commit is contained in:
Madeline 2022-09-25 11:41:28 +10:00
parent 5b4d7dec35
commit 59d94b4894

View File

@ -56,7 +56,6 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
embeds: opts.embeds || [], embeds: opts.embeds || [],
reactions: /*opts.reactions ||*/[], reactions: /*opts.reactions ||*/[],
type: opts.type ?? 0, type: opts.type ?? 0,
edited_timestamp: null
}); });
if (message.content && message.content.length > Config.get().limits.message.maxCharacters) { if (message.content && message.content.length > Config.get().limits.message.maxCharacters) {
@ -151,7 +150,7 @@ export async function postHandleMessage(message: Message) {
const data = { ...message }; const data = { ...message };
data.embeds = data.embeds.filter((x) => x.type !== "link"); data.embeds = data.embeds.filter((x) => x.type !== "link");
links = links.slice(0, 20); // embed max 20 links — TODO: make this configurable with instance policies links = links.slice(0, 20) as RegExpMatchArray; // embed max 20 links — TODO: make this configurable with instance policies
const { endpointPublic, resizeWidthMax, resizeHeightMax } = Config.get().cdn; const { endpointPublic, resizeWidthMax, resizeHeightMax } = Config.get().cdn;