cleanup dead code, update gitignore
This commit is contained in:
1 parent
da3bf64efc
commit
b2cb0cbd42
4 files changed
+1
-56
No files matched your search
@@ -302,29 +302,6 @@ func (b *Bridge) sendICE(cand *webrtc.ICECandidate, target string, pcSeq int) {
|
||||
})
|
||||
}
|
||||
|
||||
func (b *Bridge) requestVideoSlots() {
|
||||
b.setSlotsKey++
|
||||
log.Printf("[tm-ws] -> setSlots key=%d", b.setSlotsKey)
|
||||
b.wsSend(tmapi.SetSlotsMessage(b.setSlotsKey))
|
||||
}
|
||||
|
||||
func (b *Bridge) forceReconnect(reason string) {
|
||||
oldPeerID := b.connInfo.PeerID
|
||||
log.Printf("[tm-ws] forcing reconnect: %s", reason)
|
||||
if oldPeerID != "" {
|
||||
log.Printf("[tm-ws] kicking self pid=%s to leave call cleanly", oldPeerID)
|
||||
if err := b.kickPeer(oldPeerID); err != nil {
|
||||
log.Printf("[tm-ws] self-kick failed: %v", err)
|
||||
}
|
||||
}
|
||||
clientInstanceID = uuid.New().String()
|
||||
log.Printf("[tm-ws] new instance-id=%s", clientInstanceID)
|
||||
b.mu.Lock()
|
||||
ws := b.ws
|
||||
b.mu.Unlock()
|
||||
common.CloseWS(ws)
|
||||
}
|
||||
|
||||
func (b *Bridge) sendInitBundle() {
|
||||
if b.initBundleSent {
|
||||
return
|
||||
|
||||
@@ -116,23 +116,6 @@ func httpPost(endpoint string, form url.Values, extraHeaders map[string]string)
|
||||
return io.ReadAll(resp.Body)
|
||||
}
|
||||
|
||||
func httpGet(endpoint string) ([]byte, error) {
|
||||
req, err := http.NewRequest("GET", endpoint, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header.Set("User-Agent", common.UserAgent)
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if strings.Contains(resp.Request.URL.String(), "challenge") {
|
||||
return nil, fmt.Errorf("VK captcha required - open %s in browser and solve it", resp.Request.URL.String())
|
||||
}
|
||||
return io.ReadAll(resp.Body)
|
||||
}
|
||||
|
||||
func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, error) {
|
||||
auth := func(bearer string) map[string]string {
|
||||
return map[string]string{"Authorization": "Bearer " + bearer}
|
||||
|
||||
Reference in new issue
Block a user