diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js index 7d8669d38..b67b98582 100644 --- a/client/coral-embed-stream/src/CommentStream.js +++ b/client/coral-embed-stream/src/CommentStream.js @@ -85,6 +85,7 @@ class CommentStream extends Component { const rootItemId = this.props.items.assets && Object.keys(this.props.items.assets)[0]; const rootItem = this.props.items.assets && this.props.items.assets[rootItemId]; const {loggedIn, user} = this.props.auth; + const {actions, users, comments} = this.props.items; return
{ rootItem @@ -105,7 +106,7 @@ class CommentStream extends Component { id={rootItemId} premod={this.props.config.moderation} reply={false} - authorId={user.id} + author={user} /> {!loggedIn && }
@@ -114,7 +115,7 @@ class CommentStream extends Component { const comment = this.props.items.comments[commentId]; return

- +
@@ -124,7 +125,7 @@ class CommentStream extends Component { @@ -160,7 +162,7 @@ class CommentStream extends Component { let reply = this.props.items.comments[replyId]; return

- +
diff --git a/client/coral-plugin-author-name/AuthorName.js b/client/coral-plugin-author-name/AuthorName.js index 585c1c07d..aef819468 100644 --- a/client/coral-plugin-author-name/AuthorName.js +++ b/client/coral-plugin-author-name/AuthorName.js @@ -1,9 +1,9 @@ import React from 'react'; const packagename = 'coral-plugin-author-name'; -const AuthorName = ({name}) => +const AuthorName = ({author}) =>
- {name} + {author && author.displayName}
; export default AuthorName; diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index be03177f8..e18d83acc 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -22,11 +22,11 @@ class CommentBox extends Component { } postComment = () => { - const {postItem, updateItem, id, parent_id, addNotification, appendItemArray, premod, authorId} = this.props; + const {postItem, updateItem, id, parent_id, addNotification, appendItemArray, premod, author} = this.props; let comment = { body: this.state.body, asset_id: id, - user_id: authorId.id + user_id: author.id }; let related; let parent_type; @@ -53,7 +53,7 @@ class CommentBox extends Component { } render () { - const {styles, reply, authorId} = this.props; + const {styles, reply, author} = this.props; // How to handle language in plugins? Should we have a dependency on our central translation file? return
- { authorId && ( + { author && (