FIX: do not notify in title if you created the post

This commit is contained in:
Sam 2015-10-12 12:45:04 +11:00
parent e29fe77b45
commit e17978a203
2 changed files with 5 additions and 1 deletions
app
assets/javascripts/discourse/controllers
models

View file

@ -583,7 +583,9 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
}
case "created": {
postStream.triggerNewPostInStream(data.id);
Discourse.notifyBackgroundCountIncrement();
if (self.get('currentUser.id') !== data.user_id) {
Discourse.notifyBackgroundCountIncrement();
}
return;
}
default: {

View file

@ -106,6 +106,8 @@ class Post < ActiveRecord::Base
id: id,
post_number: post_number,
updated_at: Time.now,
user_id: user_id,
last_editor_id: last_editor_id,
type: type
}