MCPcopy Create free account
hub / github.com/53AI/53AIHub / handleRelayConversationIDForAgent

Function handleRelayConversationIDForAgent

api/middleware/relay_auth.go:252–263  ·  view source on GitHub ↗
(c *gin.Context, eid int64, userID int64, agent *model.Agent, conversationIDValue interface{})

Source from the content-addressed store, hash-verified

250}
251
252func handleRelayConversationIDForAgent(c *gin.Context, eid int64, userID int64, agent *model.Agent, conversationIDValue interface{}) bool {
253 if agent != nil && agent.IsOpenClawWSCompatible() {
254 rawConversationID, ok := stringifyConversationID(conversationIDValue)
255 if !ok {
256 writeConversationNotFound(c)
257 return false
258 }
259 c.Set(session.SESSION_CONVERSATION_ID, rawConversationID)
260 return true
261 }
262 return handlePlatformConversationID(c, eid, userID, conversationIDValue)
263}
264
265func handlePlatformConversationID(c *gin.Context, eid int64, userID int64, conversationIDValue interface{}) bool {
266 conversationID, ok := parsePlatformConversationID(conversationIDValue)

Callers 2

RelayTokenAuthFunction · 0.85

Calls 5

stringifyConversationIDFunction · 0.85
SetMethod · 0.80

Tested by

no test coverage detected