【问题标题】:Gating error in quickblox ("quickblox unreadMessageCount is not defined")quickblox 中的门控错误(“未定义 quickblox unreadMessageCount”)
【发布时间】:2017-08-10 13:01:48
【问题描述】:

我想访问未读邮件总数。我在 rails 应用程序 中使用的代码是

    function unreadMessageCount(){
        Set<String> dialogsIds = new HashSet<String>(){{ add("56f3fac3a0eb4786ae00003f"); add("56f3f546a28f9affc0000033"); }};
        QBChatService.getTotalUnreadMessagesCount(dialogsIds, new QBEntityCallback<Integer>() {
            @Override public void onSuccess(Integer total, Bundle params) {
                Log.i(TAG, "total unread messages: " + total);
                Log.i(TAG, "dialog Unread1: " + 
                params.getInt("56f3fac3a0eb4786ae00003f"));
                Log.i(TAG, "dialog Unread2: " + 
                params.getInt("56f3f546a28f9affc0000033"));
            }
            @Override public void onError(QBResponseException responseException) { }
        });
    } ```
In js console I am gating "unreadMessageCount is not defined".

【问题讨论】:

  • 此代码适用于 android,不适用于 js

标签: javascript java quickblox


【解决方案1】:
var params = {chat_dialog_ids: ["12788459823458761223123124"]};
QB.chat.message.unreadCount(params, function(err, res) {
    if(err){

    }else{

    }
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多