diff --git a/app/assets/javascripts/discourse/models/post.js b/app/assets/javascripts/discourse/models/post.js index 9d4e2ba72d6..7b450d1584f 100644 --- a/app/assets/javascripts/discourse/models/post.js +++ b/app/assets/javascripts/discourse/models/post.js @@ -131,6 +131,7 @@ Discourse.Post = Discourse.Model.extend({ // Save a post and call the callback when done. save: function(complete, error) { + var self = this; if (!this.get('newPost')) { // We're updating a post return Discourse.ajax("/posts/" + (this.get('id')), { @@ -141,6 +142,7 @@ Discourse.Post = Discourse.Model.extend({ } }).then(function(result) { // If we received a category update, update it + self.set('version', result.post.version); if (result.category) Discourse.Site.instance().updateCategory(result.category); if (complete) complete(Discourse.Post.create(result.post)); }, function(result) {