尝试以下操作失败:
this._directChatsRef = this.db.list(`users/${this.authProvider.getUID()}/chat`, {
query: {
orderByChild: 'read',
equalTo: false
}
});
this._directChatsRef.subscribe((directChats) => {
this._chats = directChats.length;
});
我知道chat
对象正上方有一个对象,但是如何使用指定的查询返回firebase中的聊天对象数组呢?
这样做的目的是获取unread
条消息。
谢谢!