(authId: string, threadId: string)
| 89 | } |
| 90 | |
| 91 | static async canAuthAccessThread(authId: string, threadId: string) { |
| 92 | return await prisma.auths.findFirst({ |
| 93 | where: { |
| 94 | id: authId, |
| 95 | users: { |
| 96 | some: { |
| 97 | account: { |
| 98 | channels: { some: { threads: { some: { id: threadId } } } }, |
| 99 | }, |
| 100 | }, |
| 101 | }, |
| 102 | }, |
| 103 | }); |
| 104 | } |
| 105 | } |