小编Mun*_*eeb的帖子

如何在 twilio-programmable-chat 中对频道进行分页?

我正在使用 twilio javascript sdk 进行 twilio-programmable-chat。

我想对我的频道结果应用分页,但我无法弄清楚。

这是我当前的代码。

this.chatClient.getUserChannelDescriptors().then(paginator => {

  // All channels are fetched

})
Run Code Online (Sandbox Code Playgroud)

我试图通过一个pageSize类似于 how getMessages(10)work 的方法,但是没有用。

this.chatClient.getUserChannelDescriptors(10).then(paginator => {
 // The result was same, it fetched all the channels instead of just 10
})
Run Code Online (Sandbox Code Playgroud)

我正在寻找一个示例,说明如何在频道上完成分页。谢谢。

javascript twilio reactjs twilio-programmable-chat

1
推荐指数
1
解决办法
1067
查看次数