i am trying to update a subcollection field, which is in an array, but cannot get with where(). wha am i doing wrong?
async updateDialogueStatus({ state }, data){
const whoDis = this.$fire.auth.currentUser
if (data.dialogue.length > 0) {
const lastDialogueInArray = data.dialogue.slice(-1)[0];
const db = this.$fire.firestore;
db.collection('conversations')
.doc(data.id)
.collection('dialogue')
.where("messageId", "==", lastDialogueInArray.messageId)
.update({
status: "read",
readBy: whoDis.email
})
} else {
i am getting this error: Uncaught (in promise) TypeError: db.collection(...).doc(...).collection(...).where(...).update is not a function