I have a Twilio channel and I'm trying to get its invited users, but I'm not sure how to do this:
let messagingClient = this.state.messagingClient;
messagingClient.getUserChannelDescriptors().then(channels => {
let channelsHash = {};
channels.items.map(channelDescriptor => {
var channel = channelDescriptor.getChannel().then((channel) => {
channelsHash[channel.uniqueName] = channel;
console.log(channel.getInvited()) // print invited users
});
});
What would I replace the channel.getInvited()
by? It seems like Twilio channels do indeed have such a property, as there is an invited resource here: https://www.twilio.com/docs/api/chat/rest/invites#action-list