fix: support agora rtc join delivery flow

This commit is contained in:
richjohnrambo
2026-09-02 01:42:19 +08:00
parent dc5e09f2ae
commit 15a4174ed1
6 changed files with 85 additions and 23 deletions
+3 -1
View File
@@ -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) {