edit(newText) {
    return DataSync.update(`/rooms/${this.roomId}/messages/${this.uid}`, { text: newText })
      .then(() => {
        this.text = newText;
        return this;
      })
      .catch(Log.r('Message~edit'));
  }
/**
   * Edit the text message. Only the sender or moderator/owner of the room can edit a message.
   * @param {string} newText The new message
   * @returns {Promise<Message>}
   */
Edit the text message. Only the sender or moderator/owner of the room can edit a message.
@param {string} newText The new message
@returns {Promise}
Edit the text message . Only the sender or moderator / owner of the room can edit a message . @param { string } newText The new message @returns { Promise }
edit(newText) {
    return DataSync.update(`/rooms/${this.roomId}/messages/${this.uid}`, { text: newText })
      .then(() => {
        this.text = newText;
        return this;
      })
      .catch(Log.r('Message~edit'));
  }
edit ( newText ) { return DataSync . update ( ` ${ this . roomId } ${ this . uid } ` , { text : newText } ) . then ( ( ) => { this . text = newText ; return this ; } ) . catch ( Log . r ( 'Message~edit' ) ) ; }
Edit the text message.
Edit the text message .