MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / queryThreads

Function queryThreads

packages/typesense/src/utils/shared.ts:45–80  ·  view source on GitHub ↗
({
  where,
  orderBy,
  take,
}: Prisma.threadsFindManyArgs)

Source from the content-addressed store, hash-verified

43}
44
45export async function queryThreads({
46 where,
47 orderBy,
48 take,
49}: Prisma.threadsFindManyArgs) {
50 return await prisma.threads.findMany({
51 include: {
52 messages: {
53 include: {
54 author: true,
55 mentions: {
56 include: {
57 users: true,
58 },
59 },
60 reactions: true,
61 attachments: true,
62 },
63 orderBy: { sentAt: 'asc' },
64 },
65 channel: {
66 include: {
67 memberships: {
68 select: {
69 usersId: true,
70 user: { select: { authsId: true } },
71 },
72 },
73 },
74 },
75 },
76 where,
77 orderBy,
78 take,
79 });
80}
81
82export function threadsWhere({ accountId }: { accountId: string }) {
83 return {

Callers 6

handleDeletionFunction · 0.90
processQueryFunction · 0.90
handleMessageCreationFunction · 0.90
syncUpdatedThreadsFunction · 0.90
setupFunction · 0.90
handleChannelNameUpdateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected