MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / canJoinConversation

Method canJoinConversation

server/modules/socketManager.js:58–74  ·  view source on GitHub ↗
(userId, conversationId, teamId = null)

Source from the content-addressed store, hash-verified

56 }
57
58 async canJoinConversation(userId, conversationId, teamId = null) {
59 if (!userId || !conversationId) {
60 return false;
61 }
62
63 const where = {
64 id: conversationId,
65 user_id: userId,
66 };
67
68 if (teamId) {
69 where.team_id = teamId;
70 }
71
72 const conversation = await db.AiConversation.findOne({ where });
73 return Boolean(conversation);
74 }
75
76 async initialize(server) {
77 this.io = new Server(server, {

Calls

no outgoing calls

Tested by

no test coverage detected