diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js index cda7ffd57..65e02e2ee 100644 --- a/client/coral-embed-stream/src/CommentStream.js +++ b/client/coral-embed-stream/src/CommentStream.js @@ -123,14 +123,12 @@ class CommentStream extends Component {
- { - // - } + @@ -153,14 +151,12 @@ class CommentStream extends Component {
- { - // - } + diff --git a/client/coral-framework/store/actions/items.js b/client/coral-framework/store/actions/items.js index 956b70350..c292426d1 100644 --- a/client/coral-framework/store/actions/items.js +++ b/client/coral-framework/store/actions/items.js @@ -121,9 +121,15 @@ export function getStream (assetId) { comments: rootComments })) - const keys = Object.keys(childComments) - for (var i=0; i < keys.length; i++ ) { - dispatch(updateItem(keys[i], 'children', childComments[keys[i]].reverse())) + const childKeys = Object.keys(childComments) + for (var i=0; i < childKeys.length; i++ ) { + dispatch(updateItem(childKeys[i], 'children', childComments[childKeys[i]].reverse())) + } + + /* Hydrate actions on comments */ + const actions = Object.keys(json.actions) + for (var i=0; i < actions.length; i++ ) { + dispatch(updateItem(actions[i].item_id, actions[i].type, actions[i].id)) } return (json)