async _readMessage(chatId, chatInfo, chatMessageInfo) {
    const userId = firebaseAuth.currentUser.uid;
    if (userId === chatMessageInfo.sender.id) {
      return;
    }

    const receiverType = this._getReceiverType(chatMessageInfo.sender.type);
    const unreadCountField = `${receiverType}.unreadCount`;
    const lastActiveDateTimeField = `${receiverType}.lastActiveDateTime`;
    const data = {
      [unreadCountField]: 0,
      [lastActiveDateTimeField]: firebase.firestore.FieldValue.serverTimestamp(),
    };

    chatsCollection.doc(chatId).update(data);
  }
// Not used at the moment. Might need to use it if we decided to actively managed uses lastActiveDateTimeField
Not used at the moment. Might need to use it if we decided to actively managed uses lastActiveDateTimeField
Not used at the moment . Might need to use it if we decided to actively managed uses lastActiveDateTimeField
async _readMessage(chatId, chatInfo, chatMessageInfo) {
    const userId = firebaseAuth.currentUser.uid;
    if (userId === chatMessageInfo.sender.id) {
      return;
    }
    const receiverType = this._getReceiverType(chatMessageInfo.sender.type);
    const unreadCountField = `${receiverType}.unreadCount`;
    const lastActiveDateTimeField = `${receiverType}.lastActiveDateTime`;
    const data = {
      [unreadCountField]: 0,
      [lastActiveDateTimeField]: firebase.firestore.FieldValue.serverTimestamp(),
    };
    chatsCollection.doc(chatId).update(data);
  }
async _readMessage ( chatId , chatInfo , chatMessageInfo ) { const userId = firebaseAuth . currentUser . uid ; if ( userId === chatMessageInfo . sender . id ) { return ; } const receiverType = this . _getReceiverType ( chatMessageInfo . sender . type ) ; const unreadCountField = ` ${ receiverType } ` ; const lastActiveDateTimeField = ` ${ receiverType } ` ; const data = { [ unreadCountField ] : 0 , [ lastActiveDateTimeField ] : firebase . firestore . FieldValue . serverTimestamp ( ) , } ; chatsCollection . doc ( chatId ) . update ( data ) ; }
Not used at the moment.
Not used at the moment .