async sendInitialCalendarMessagesForWish(wishId, calendars) {
    this._validateChatMessages(CALENDAR, calendars);

    const [chatDoc, donorInfo] = await this._fetchInfoAndCreateChatForWish(wishId);
    const chatInfo = chatDoc.data();
    const chatMessages = await this._sendCalendarMessages(chatInfo.chatId, calendars, chatInfo, donor, donorInfo);
    return [chatDoc, chatMessages];
  }
/**
   * Create calendar chat messages for a wish without an existing chat. It will create a new chat and add the chat messages within it
   * @param {string} wishId The id of the wish
   * @param {array} calendar A list of calendar messages. Messages are created in the order in the list
   * @throws {ChatError}
   * @throws {FirebaseError}
   * @return {array} [chatDoc, chatMessageDoc]
   *  {object} chatDoc: The firebase document for the created chat
   *  {array} chatMessagesDocs: A list of firebase documents of the created chat messages
   */
Create calendar chat messages for a wish without an existing chat. It will create a new chat and add the chat messages within it
@param {string} wishId The id of the wish
@param {array} calendar A list of calendar messages. Messages are created in the order in the list
@throws {ChatError}
@throws {FirebaseError}
@return {array} [chatDoc, chatMessageDoc]
{object} chatDoc: The firebase document for the created chat
{array} chatMessagesDocs: A list of firebase documents of the created chat messages
Create calendar chat messages for a wish without an existing chat . It will create a new chat and add the chat messages within it @param { string } wishId The id of the wish @param { array } calendar A list of calendar messages . Messages are created in the order in the list @throws { ChatError } @throws { FirebaseError } @return { array } [ chatDoc chatMessageDoc ] { object } chatDoc : The firebase document for the created chat { array } chatMessagesDocs : A list of firebase documents of the created chat messages
async sendInitialCalendarMessagesForWish(wishId, calendars) {
    this._validateChatMessages(CALENDAR, calendars);
    const [chatDoc, donorInfo] = await this._fetchInfoAndCreateChatForWish(wishId);
    const chatInfo = chatDoc.data();
    const chatMessages = await this._sendCalendarMessages(chatInfo.chatId, calendars, chatInfo, donor, donorInfo);
    return [chatDoc, chatMessages];
  }
async sendInitialCalendarMessagesForWish ( wishId , calendars ) { this . _validateChatMessages ( CALENDAR , calendars ) ; const [ chatDoc , donorInfo ] = await this . _fetchInfoAndCreateChatForWish ( wishId ) ; const chatInfo = chatDoc . data ( ) ; const chatMessages = await this . _sendCalendarMessages ( chatInfo . chatId , calendars , chatInfo , donor , donorInfo ) ; return [ chatDoc , chatMessages ] ; }
Create calendar chat messages for a wish without an existing chat.
Create calendar chat messages for a wish without an existing chat .