diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
index 166c5fdced..9edc01ed76 100644
--- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx
+++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
@@ -36,6 +36,8 @@ const ComposeForm = React.createClass({
in_reply_to: ImmutablePropTypes.map,
media_count: React.PropTypes.number,
me: React.PropTypes.number,
+ needsPrivacyWarning: React.PropTypes.bool,
+ mentionedDomains: React.PropTypes.array.isRequired,
onChange: React.PropTypes.func.isRequired,
onSubmit: React.PropTypes.func.isRequired,
onCancelReply: React.PropTypes.func.isRequired,
@@ -117,16 +119,29 @@ const ComposeForm = React.createClass({
},
render () {
- const { intl } = this.props;
- let replyArea = '';
- let publishText = '';
- const disabled = this.props.is_submitting || this.props.is_uploading;
+ const { intl, needsPrivacyWarning, mentionedDomains } = this.props;
+ const disabled = this.props.is_submitting || this.props.is_uploading;
+
+ let replyArea = '';
+ let publishText = '';
+ let privacyWarning = '';
+ let reply_to_other = !!this.props.in_reply_to && (this.props.in_reply_to.getIn(['account', 'id']) !== this.props.me);
if (this.props.in_reply_to) {
replyArea = ;
}
- let reply_to_other = !!this.props.in_reply_to && (this.props.in_reply_to.getIn(['account', 'id']) !== this.props.me);
+ if (needsPrivacyWarning) {
+ privacyWarning = (
+
+ {mentionedDomains.join(', ')}, domainsCount: mentionedDomains.length }}
+ />
+
+ );
+ }
if (this.props.private) {
publishText = {intl.formatMessage(messages.publish)};
@@ -142,6 +157,7 @@ const ComposeForm = React.createClass({
+ {privacyWarning}
{replyArea}
-
-
-
- }
-