mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[dsmp] Add endpoint to retrieve a single message from chat (#28242)
* [dsmp] Add endpoint to retrieve a single message from chat * use user:null in case is deleted GitOrigin-RevId: f42360c2e05cfe93fa11230ac3cc311bdb044c1d
This commit is contained in:
committed by
Copybot
parent
1fe9277b5b
commit
ff0e725935
@@ -148,9 +148,14 @@ export async function duplicateThread(projectId, threadId) {
|
||||
}
|
||||
|
||||
export async function findThread(projectId, threadId) {
|
||||
projectId = new ObjectId(projectId.toString())
|
||||
if (threadId !== GLOBAL_THREAD) {
|
||||
threadId = new ObjectId(threadId.toString())
|
||||
}
|
||||
|
||||
const room = await db.rooms.findOne({
|
||||
project_id: new ObjectId(projectId),
|
||||
thread_id: new ObjectId(threadId),
|
||||
project_id: projectId,
|
||||
thread_id: threadId === GLOBAL_THREAD ? { $exists: false } : threadId,
|
||||
})
|
||||
if (!room) {
|
||||
throw new MissingThreadError('Thread not found')
|
||||
|
||||
Reference in New Issue
Block a user