Hi Richard,
Starting context:
/rooms/$chatid/members/aarav => true/rooms/$chatid/members/mary => true
/messages/$chatid/$messageid => { ..., timestamp }
var authUid = 'aarav';
var chatId = 'room 1';
var ref = firebase.database().ref();
// query to fetch all rooms that Mary is a member of
var roomQuery = ref.child('rooms').orderByChild('members/' + authUid).equalTo(true);
// query to fetch messages for a single room
var messageQuery = ref.child('messages').child( chatId ).orderByChild('timestamp').limitToLast( 50 );
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/48e38dc6-4ca9-491b-aaa8-d21964816e9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.