message: fix: adding promises from messaging SDK to the operations list and waiting for them to resolve in queueStatusUpdateTrigger Function in offer triggers
diff: @@ -28,7 +28,8 @@ const queueStatusUpdateTriggers = async (change: Change<DocumentSnapshot>): Prom
  const request = (await offerAfter.requestRef.withConverter(RequestFirestoreConverter).get()).data();
  - messaging.send({
  + operations.push(((): Promise<void> => {
  + return messaging.send({
  data:{
  entity: 'offer',
  action: 'accepted',
  @@ -41,9 +42,12 @@ const queueStatusUpdateTriggers = async (change: Change<DocumentSnapshot>): Prom
  request_status: RequestStatus.ongoing
  },
  topic: `${offerAfter.cavUserRef.id}_notifications`
  - });
  + })
  + .then(result=> Promise.resolve())
  + })());
  - messaging.send({
  + operations.push(((): Promise<void> => {
  + return messaging.send({
  data:{
  entity: 'request',
  action: 'offeraccepted',
  @@ -57,7 +61,9 @@ const queueStatusUpdateTriggers = async (change: Change<DocumentSnapshot>): Prom
  request_status: RequestStatus.ongoing
  },
  topic: `${offerAfter.requestRef.id}_request_notifications`
  - });
  + })
  + .then(result => Promise.resolve());
  + })());
  //We could also send it to ${offerAfter.requestRef.id}_requestNotification and let everyone who responded
  //to the request know that the request accepted an offer. We will provide the offer ID as well. the clients
  @@ -95,9 +101,7 @@ const queueOfferCreationTriggers = async (snap: DocumentSnapshot): Promise<void[
  },
  topic: `${offer.requestRef.id}_request_notifications`
  })
  - .then(result =>{
  - return Promise.resolve()
  - })
  + .then(result => Promise.resolve())
  })())
  operations.push(((): Promise<void> => {
  @@ -115,9 +119,7 @@ const queueOfferCreationTriggers = async (snap: DocumentSnapshot): Promise<void[
  },
  topic: `${request?.pinUserRef.id}_notifications`
  })
  - .then(result =>{
  - return Promise.resolve()
  - })
  + .then(result => Promise.resolve())
  })())
  }
  