add bitrix support
This commit is contained in:
1 parent
747f8f2312
commit
5690cf58a9
62 files changed
+4098
-1053
No files matched your search
@@ -322,13 +322,13 @@ func (h *VKHeadlessJoiner) joinCall() error {
|
||||
|
||||
var joinResp VKJoinResponse
|
||||
if jsonErr := json.Unmarshal(raw, &joinResp); jsonErr != nil {
|
||||
return fmt.Errorf("decode join response: %w (body: %s)", jsonErr, truncateBody(raw))
|
||||
return fmt.Errorf("decode join response: %w (body: %s)", jsonErr, common.BodySnippet(raw))
|
||||
}
|
||||
if joinResp.Endpoint == "" {
|
||||
if rotten := detectVKAuthRotten(raw); rotten != nil {
|
||||
return rotten
|
||||
}
|
||||
return fmt.Errorf("empty endpoint in join response: %s", truncateBody(raw))
|
||||
return fmt.Errorf("empty endpoint in join response: %s", common.BodySnippet(raw))
|
||||
}
|
||||
|
||||
h.joinResp = &joinResp
|
||||
@@ -361,14 +361,6 @@ func detectVKAuthRotten(raw []byte) *vkAuthRottenError {
|
||||
return nil
|
||||
}
|
||||
|
||||
func truncateBody(raw []byte) string {
|
||||
const maxLen = 200
|
||||
if len(raw) > maxLen {
|
||||
return string(raw[:maxLen]) + "..."
|
||||
}
|
||||
return string(raw)
|
||||
}
|
||||
|
||||
func (h *VKHeadlessJoiner) connectSFU() {
|
||||
endpoint := h.joinResp.WtEndpoint
|
||||
if endpoint == "" {
|
||||
|
||||
Reference in new issue
Block a user