don't alert for inbox count of 0

This commit is contained in:
Sam 2016-01-27 23:13:37 +11:00
parent bf650de7be
commit 50a63a491c
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
const INVITED_TYPE = 8;
const GROUP_SUMMARY_TYPE = 16;
export default Ember.Component.extend({
tagName: 'li',
@ -69,7 +70,7 @@ export default Ember.Component.extend({
const description = this.get('description');
const username = notification.get('data.display_username');
var text;
if (notification.get('data.inbox_count')) {
if (notification.get('notification_type') === GROUP_SUMMARY_TYPE) {
const count = notification.get('data.inbox_count');
const group_name = notification.get('data.group_name');
text = I18n.t(this.get('scope'), {count, group_name});

View File

@ -172,7 +172,7 @@ class PostAlerter
.pluck(:group_id).first
stat = stats.find{|s| s[:group_id] == group_id}
return unless stat
return unless stat && stat[:inbox_count] > 0
notification_type = Notification.types[:group_message_summary]