summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_post.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-07-22 15:54:57 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-07-22 15:54:57 -0400
commit89c7fa8a8e5b1c4e9b6d0b4b41fab7ed2f9ad490 (patch)
treee5014e7148e12f5135d40a0bfd1fe9d8efa097f7 /web/react/components/create_post.jsx
parent74eec229489b236abeb71303174778f6d4420185 (diff)
parentee25df7e5545ad3f4d6817b967a0bcea6e6e398d (diff)
downloadchat-89c7fa8a8e5b1c4e9b6d0b4b41fab7ed2f9ad490.tar.gz
chat-89c7fa8a8e5b1c4e9b6d0b4b41fab7ed2f9ad490.tar.bz2
chat-89c7fa8a8e5b1c4e9b6d0b4b41fab7ed2f9ad490.zip
Merge pull request #228 from nickago/MM-1547
MM-1547 Added local cache storing of drafts for comments
Diffstat (limited to 'web/react/components/create_post.jsx')
-rw-r--r--web/react/components/create_post.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index a2448b569..91d070958 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -55,7 +55,7 @@ module.exports = React.createClass({
post.message,
false,
function(data) {
- PostStore.storeDraft(data.channel_id, user_id, null);
+ PostStore.storeDraft(data.channel_id, null);
this.setState({ messageText: '', submitting: false, post_error: null, previews: [], server_error: null, limit_error: null });
if (data.goto_location.length > 0) {
@@ -78,7 +78,7 @@ module.exports = React.createClass({
client.createPost(post, ChannelStore.getCurrent(),
function(data) {
- PostStore.storeDraft(data.channel_id, data.user_id, null);
+ PostStore.storeDraft(data.channel_id, null);
this.setState({ messageText: '', submitting: false, post_error: null, previews: [], server_error: null, limit_error: null });
this.resizePostHolder();
AsyncClient.getPosts(true);
@@ -209,7 +209,7 @@ module.exports = React.createClass({
$(window).trigger('resize');
},
handleFileUpload: function(newPreviews, channel_id) {
- var draft = PostStore.getDraft(channel_id, UserStore.getCurrentId());
+ var draft = PostStore.getDraft(channel_id);
if (!draft) {
draft = {}
draft['message'] = '';
@@ -230,7 +230,7 @@ module.exports = React.createClass({
} else {
draft['previews'] = draft['previews'].concat(newPreviews);
draft['uploadsInProgress'] = draft['uploadsInProgress'] > 0 ? draft['uploadsInProgress'] - 1 : 0;
- PostStore.storeDraft(channel_id, UserStore.getCurrentId(), draft);
+ PostStore.storeDraft(channel_id, draft);
}
},
handleUploadError: function(err) {