I am retrieving all channels on a javascript client, but I got an issue because I need to order the channels throught the "channel updated" attribute and that's a problem because I am using this code to retreive the channels:
var messagingClient = new Twilio.Chat.Client(twilioToken);
messagingClient.initialize()
.then(() => messagingClient.getUserChannels())
.then((paginator) => {
const channels = paginator.items;
//This channels is not sorted by updated attribute
});
Now, that's not working for me because I have a support channel for each user and when the users amount increase in the future, then I will need to retrieve all channels to know event's channels like onMessageAdded. Also, I need to show only active channels on the visible channel list in frontend, and for that I need to know which channels have at least two messages. If the channel list were sorted by the "updated" attribute, then I could show the channels paginated and I would be sure that the first channels are the active ones.