summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index eedae8571..4e88a538f 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -179,8 +179,13 @@ class CreatePost extends React.Component {
this.setState({messageText: '', submitting: false, postError: null, previews: [], serverError: null});
Client.createPost(post,
- () => {
+ (data) => {
PostStore.removePendingPost(post.pending_post_id);
+
+ AppDispatcher.handleServerAction({
+ type: ActionTypes.RECEIVED_POST,
+ post: data
+ });
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {