fix: chat error message

This commit is contained in:
Bettenbuk Zoltan
2019-10-09 18:35:09 +02:00
committed by Zoltan Bettenbuk
parent 0fff1c3534
commit 6e10ca5dd2
9 changed files with 60 additions and 60 deletions
@@ -57,6 +57,21 @@ export default class AbstractChatMessage<P: Props> extends PureComponent<P> {
.format(TIMESTAMP_FORMAT);
}
/**
* Generates the message text to be redered in the component.
*
* @returns {string}
*/
_getMessageText() {
const { message } = this.props;
return message.messageType === 'error'
? this.props.t('chat.error', {
error: message.message
})
: message.message;
}
/**
* Returns the message that is displayed as a notice for private messages.
*