diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-08-17 09:35:36 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-17 09:35:36 -0700 |
commit | fd1301779fecc2910a9fdcf93af52ff33a4349ba (patch) | |
tree | ccd8b35d347b77c8c6a99db9422b3dbc0ff3bd2d /webapp/components/create_post.jsx | |
parent | d41f1695e99a81808f5dc1fbe7820062947b5291 (diff) | |
parent | 0033e3e37b12cb5d951d21492500d66a6abc472b (diff) | |
download | chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.gz chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.tar.bz2 chat-fd1301779fecc2910a9fdcf93af52ff33a4349ba.zip |
Merge branch 'release-4.1'
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r-- | webapp/components/create_post.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 55d6884ac..b57eb2f17 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -14,6 +14,7 @@ import * as EmojiPicker from 'components/emoji_picker/emoji_picker.jsx'; import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; import * as Utils from 'utils/utils.jsx'; +import * as PostUtils from 'utils/post_utils.jsx'; import * as UserAgent from 'utils/user_agent.jsx'; import * as ChannelActions from 'actions/channel_actions.jsx'; import * as PostActions from 'actions/post_actions.jsx'; @@ -224,7 +225,7 @@ export default class CreatePost extends React.Component { const members = stats.member_count - 1; const updateChannel = ChannelStore.getCurrent(); - if ((this.state.message.includes('@all') || this.state.message.includes('@channel')) && members >= Constants.NOTIFY_ALL_MEMBERS) { + if ((PostUtils.containsAtMention(this.state.message, '@all') || PostUtils.containsAtMention(this.state.message, '@channel')) && members >= Constants.NOTIFY_ALL_MEMBERS) { this.setState({totalMembers: members}); this.showNotifyAllModal(); return; |