diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js
index cb5fcd89a..7d8669d38 100644
--- a/client/coral-embed-stream/src/CommentStream.js
+++ b/client/coral-embed-stream/src/CommentStream.js
@@ -105,7 +105,7 @@ class CommentStream extends Component {
id={rootItemId}
premod={this.props.config.moderation}
reply={false}
- canPost={loggedIn}
+ authorId={user.id}
/>
{!loggedIn && }
diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js
index e712d8e24..be03177f8 100644
--- a/client/coral-plugin-commentbox/CommentBox.js
+++ b/client/coral-plugin-commentbox/CommentBox.js
@@ -12,7 +12,8 @@ class CommentBox extends Component {
id: PropTypes.string,
comments: PropTypes.array,
reply: PropTypes.bool,
- canPost: PropTypes.bool
+ canPost: PropTypes.bool,
+ currentUser: PropTypes.object
}
state = {
@@ -21,11 +22,11 @@ class CommentBox extends Component {
}
postComment = () => {
- const {postItem, updateItem, id, parent_id, addNotification, appendItemArray, premod} = this.props;
+ const {postItem, updateItem, id, parent_id, addNotification, appendItemArray, premod, authorId} = this.props;
let comment = {
body: this.state.body,
asset_id: id,
- username: this.state.username
+ user_id: authorId.id
};
let related;
let parent_type;
@@ -52,7 +53,7 @@ class CommentBox extends Component {
}
render () {
- const {styles, reply, canPost} = this.props;
+ const {styles, reply, authorId} = this.props;
// How to handle language in plugins? Should we have a dependency on our central translation file?
return
- { canPost && (
+ { authorId && (