Attempting the below fails:
this._directChatsRef = this.db.list(`users/${this.authProvider.getUID()}/chat`, {
query: {
orderByChild: 'read',
equalTo: false
}
});
this._directChatsRef.subscribe((directChats) => {
this._chats = directChats.length;
});
I know there's an object right above the chat
object, but how can I return just the array of chat objects from firebase with the specified query?
The purpose of this is to get a count of unread
messages.
Thanks!