• Parameters

    • cm: ChatMessage

      Chat Message document

    • Optionaloptions: {
          commit: undefined | boolean;
          state: undefined | MigrationState;
      } = {}

      Additional options

      • commit: undefined | boolean

        If false, no update is performed. Returns update data instead.

      • state: undefined | MigrationState

        State tragger. Internal use only.

    Returns Promise<null | object | ChatMessage>

    • Returns null if no update is needed, promise if commit is true, object otherwise.