mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #7317 from overleaf/jpa-return-chat-edit-status
[misc] return non-success status from editing chat messages back to web GitOrigin-RevId: a3d5f59ac1d92662ac9e9c94b1516441d66e831a
This commit is contained in:
@@ -58,13 +58,16 @@ async function editMessage(req, res) {
|
||||
const { projectId, threadId, messageId } = req.params
|
||||
logger.log({ projectId, threadId, messageId, content }, 'editing message')
|
||||
const room = await ThreadManager.findOrCreateThread(projectId, threadId)
|
||||
await MessageManager.updateMessage(
|
||||
const found = await MessageManager.updateMessage(
|
||||
room._id,
|
||||
messageId,
|
||||
userId,
|
||||
content,
|
||||
Date.now()
|
||||
)
|
||||
if (!found) {
|
||||
return res.sendStatus(404)
|
||||
}
|
||||
res.sendStatus(204)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user