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

Function findThreadsByChannel

apps/web/services/threads/index.ts:442–461  ·  view source on GitHub ↗
({
  channelId,
  cursor,
  limit = 10,
}: {
  channelId: string;
  cursor?: number;
  limit?: number;
})

Source from the content-addressed store, hash-verified

440}
441
442export const findThreadsByChannel = ({
443 channelId,
444 cursor,
445 limit = 10,
446}: {
447 channelId: string;
448 cursor?: number;
449 limit?: number;
450}) => {
451 return prisma.threads.findMany({
452 where: {
453 channelId,
454 sentAt: { gt: cursor || 0 },
455 hidden: false,
456 messageCount: { gt: 1 },
457 },
458 take: limit,
459 orderBy: { sentAt: 'asc' },
460 });
461};
462
463export async function findPinnedThreads({
464 channelIds,

Callers 1

saveAllThreadsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected