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

Function parsePlatformConversationID

api/middleware/relay_auth.go:281–293  ·  view source on GitHub ↗
(conversationIDValue interface{})

Source from the content-addressed store, hash-verified

279}
280
281func parsePlatformConversationID(conversationIDValue interface{}) (int64, bool) {
282 switch v := conversationIDValue.(type) {
283 case float64:
284 return int64(v), true
285 case int64:
286 return v, true
287 case string:
288 if decoded, err := hashids.TryParseID(v); err == nil {
289 return int64(decoded), true
290 }
291 }
292 return 0, false
293}
294
295func stringifyConversationID(conversationIDValue interface{}) (string, bool) {
296 switch v := conversationIDValue.(type) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected