fix: support agora rtc join delivery flow
This commit is contained in:
@@ -64,10 +64,12 @@ func serveIMCallRTCJoin(wrt http.ResponseWriter, req *http.Request) {
|
||||
writeIMError(wrt, req, http.StatusBadRequest, 30000, imReasonMalformedRequest, "malformed request", nil)
|
||||
return
|
||||
}
|
||||
if types.GetTopicCat(body.Topic) != types.TopicCatP2P {
|
||||
normalizedTopic, _ := normalizeP2PConversationTopic(body.Topic, principal.Uid)
|
||||
if normalizedTopic == "" {
|
||||
writeIMError(wrt, req, http.StatusBadRequest, 30000, imReasonMalformedRequest, "malformed request", map[string]any{"field": "topic"})
|
||||
return
|
||||
}
|
||||
body.Topic = normalizedTopic
|
||||
config, err := loadIMAgoraConfig()
|
||||
if err != nil {
|
||||
if errors.Is(err, types.ErrNotFound) || errors.Is(err, types.ErrMalformed) {
|
||||
|
||||
Reference in New Issue
Block a user