Class: Notifications::MentionedInPost

Inherits:
Notification show all
Includes:
Mentioned
Defined in:
app/models/notifications/mentioned_in_post.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mentioned

#linked_object

Methods inherited from Notification

concatenate_or_create, create_notification, #email_the_user, for, #linked_object, #set_read_state

Methods included from Diaspora::Fields::Guid

included, #set_guid

Class Method Details

.filter_mentions(mentions, mentionable, recipient_user_ids) ⇒ Object


19
20
21
22
# File 'app/models/notifications/mentioned_in_post.rb', line 19

def self.filter_mentions(mentions, mentionable, recipient_user_ids)
  return mentions if mentionable.public
  mentions.where(person: Person.where(owner_id: recipient_user_ids).ids)
end

Instance Method Details

#deleted_translation_keyObject


15
16
17
# File 'app/models/notifications/mentioned_in_post.rb', line 15

def deleted_translation_key
  "notifications.mentioned_deleted"
end

#mail_jobObject


7
8
9
# File 'app/models/notifications/mentioned_in_post.rb', line 7

def mail_job
  Workers::Mail::Mentioned
end

11
12
13
# File 'app/models/notifications/mentioned_in_post.rb', line 11

def popup_translation_key
  "notifications.mentioned"
end