add: improved sql requests

This commit is contained in:
Lukian 2025-05-12 10:32:28 +02:00
parent bd3cbc528c
commit 1317d431d0
3 changed files with 95 additions and 35 deletions

View file

@ -7,7 +7,6 @@ const {
addMention,
getMentions,
getUserByUsername,
setHasReplies,
addReply,
getMessageReplies
} = require('../libs/mysql');
@ -91,7 +90,6 @@ router.post('/:message_id/reply', speedLimiter, limiter, checkAuth, async (req,
const channel = await getChannel(connection, originalMessage[0].channel_name);
const sent_message = await addReply(connection, channel[0].id, user.id, message.replace("\"", "'"), message_id);
await setHasReplies(connection, message_id, true);
const new_message_id = sent_message.insertId;
for (const word of message.split(' ')) {