Twilio 聊天成员在线状态始终为空 [英] Twilio chat member online status is always null

查看:19
本文介绍了Twilio 聊天成员在线状态始终为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的聊天应用程序中,我想知道频道成员是否在线,但是 'userInfoUpdated' 在新成员到来时从不触发,并且 member.userInfo.online 是每当我想得到它时总是为空.我做错了什么?

In my chat application I want to know if a channel member is online, but 'userInfoUpdated' never fires when a new member comes and member.userInfo.online is always null whenever I want to get it. What am I doing wrong?

更新:这里代码在成员更新"时暂停,成员的 userInfo.online 字段仍然是 null

UPD: Here the code is paused on member "updated" even, the member's userInfo.online field is still null

UPD2:现在我从文档中找到了这一行

UPD2: Now I've found this line from the documentaion

扩展用户信息 请注意,UserInfo#online 和 UserInfo#notifiable 属性只有在启用可达性功能时才有资格使用.您可以通过读取 Client~reachabilityEnabled 文档

Extended user information Note that UserInfo#online and UserInfo#notifiable properties are eligible to use only if reachability function enabled. You may check if it is enabled by reading value of Client~reachabilityEnabled docs

最后在后端设置reachabilityEnabled解决了我的问题

Finally setting reachabilityEnabled on the backend solved my problem

推荐答案

在后端设置reachabilityEnabled解决了我的问题

setting reachabilityEnabled on the backend solved my problem

这篇关于Twilio 聊天成员在线状态始终为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆