(raw map[string]interface{})
| 1494 | } |
| 1495 | |
| 1496 | func streamHandoffTopicFromEvent(raw map[string]interface{}) string { |
| 1497 | options, ok := raw["options"].([]interface{}) |
| 1498 | if !ok { |
| 1499 | return "" |
| 1500 | } |
| 1501 | for _, optionValue := range options { |
| 1502 | option, ok := optionValue.(map[string]interface{}) |
| 1503 | if !ok { |
| 1504 | continue |
| 1505 | } |
| 1506 | optionType, _ := option["type"].(string) |
| 1507 | if optionType != "subscribe_ws_topic" { |
| 1508 | continue |
| 1509 | } |
| 1510 | topicID, _ := option["topic_id"].(string) |
| 1511 | return topicID |
| 1512 | } |
| 1513 | return "" |
| 1514 | } |
| 1515 | |
| 1516 | func streamHandoffTopicFromMetadata(raw map[string]interface{}) string { |
| 1517 | if turnExchangeID, _ := raw["turn_exchange_id"].(string); turnExchangeID != "" { |
no outgoing calls
no test coverage detected