summaryrefslogtreecommitdiffstats
path: root/webapp/components/textbox.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-08-17 09:35:36 -0700
committerChristopher Speller <crspeller@gmail.com>2017-08-17 09:35:36 -0700
commitfd1301779fecc2910a9fdcf93af52ff33a4349ba (patch)
treeccd8b35d347b77c8c6a99db9422b3dbc0ff3bd2d /webapp/components/textbox.jsx
parentd41f1695e99a81808f5dc1fbe7820062947b5291 (diff)
parent0033e3e37b12cb5d951d21492500d66a6abc472b (diff)
downloadchat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.gz
chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.bz2
chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.zip
Merge branch 'release-4.1'
Diffstat (limited to 'webapp/components/textbox.jsx')
-rw-r--r--webapp/components/textbox.jsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/webapp/components/textbox.jsx b/webapp/components/textbox.jsx
index 3e62d98bc..cf1d054cf 100644
--- a/webapp/components/textbox.jsx
+++ b/webapp/components/textbox.jsx
@@ -38,13 +38,15 @@ export default class Textbox extends React.Component {
suggestionListStyle: PropTypes.string,
emojiEnabled: PropTypes.bool,
isRHS: PropTypes.bool,
- popoverMentionKeyClick: React.PropTypes.bool
+ popoverMentionKeyClick: React.PropTypes.bool,
+ characterLimit: React.PropTypes.number
};
static defaultProps = {
supportsCommands: true,
isRHS: false,
- popoverMentionKeyClick: false
+ popoverMentionKeyClick: false,
+ characterLimit: Constants.CHARACTER_LIMIT
};
constructor(props) {
@@ -93,14 +95,14 @@ export default class Textbox extends React.Component {
checkMessageLength = (message) => {
if (this.props.handlePostError) {
- if (message.length > Constants.CHARACTER_LIMIT) {
+ if (message.length > this.props.characterLimit) {
const errorMessage = (
<FormattedMessage
id='create_post.error_message'
defaultMessage='Your message is too long. Character count: {length}/{limit}'
values={{
length: message.length,
- limit: Constants.CHARACTER_LIMIT
+ limit: this.props.characterLimit
}}
/>);
this.props.handlePostError(errorMessage);