MCPcopy
hub / github.com/chartbrew/chartbrew / assertConversationOwnership

Function assertConversationOwnership

server/controllers/AiController.js:7–15  ·  view source on GitHub ↗
(conversation, userId)

Source from the content-addressed store, hash-verified

5const socketManager = require("../modules/socketManager");
6
7function assertConversationOwnership(conversation, userId) {
8 if (!conversation) {
9 throw new Error("Conversation not found");
10 }
11
12 if (`${conversation.user_id}` !== `${userId}`) {
13 throw new Error("Conversation does not belong to this user");
14 }
15}
16
17async function getOrchestration(
18 teamId,

Callers 3

getOrchestrationFunction · 0.85
getConversationFunction · 0.85
deleteConversationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected