使用与会者标签检查会议中是否有与会者

时间:2020-10-13 14:23:01

标签: twilio twilio-api twilio-python

我尝试过

participant = conferences[0].participants('participant')

但这总是返回一个参与者,即使该参与者不在会议中。

participant = conferences[0].participants('participant').fetch()

如果与会者不在会议中,则会返回错误

1 个答案:

答案 0 :(得分:1)

尝试以下操作:

function findParticipant() {
return client.conferences('CFba9989...')
    .participants
    .list()
}

let findMe = 'Winston';

findParticipant()
.then(participants => {
    let result = participants.filter(participant => participant.label === findMe )
     console.log(result);
}).catch(err => console.log(err.message))