MCPcopy Index your code
hub / github.com/simstudioai/sim / getAccessibleCopilotChatAuth

Function getAccessibleCopilotChatAuth

apps/sim/lib/copilot/chat/lifecycle.ts:161–172  ·  view source on GitHub ↗
(
  chatId: string,
  userId: string
)

Source from the content-addressed store, hash-verified

159 * verification before a mutation (rename, delete, update-messages).
160 */
161export async function getAccessibleCopilotChatAuth(
162 chatId: string,
163 userId: string
164): Promise<CopilotChatAuthRow | null> {
165 const [chat] = await db
166 .select(copilotChatAuthColumns)
167 .from(copilotChats)
168 .where(and(eq(copilotChats.id, chatId), eq(copilotChats.userId, userId)))
169 .limit(1)
170
171 return authorizeCopilotChatRow(chat, chatId, userId)
172}
173
174/**
175 * Load a copilot chat row for the legacy chat detail endpoint, including the

Callers 6

route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 2

authorizeCopilotChatRowFunction · 0.85
eqFunction · 0.50

Tested by

no test coverage detected