Class: Notifications::Reshared

Inherits:
Notification show all
Defined in:
app/models/notifications/reshared.rb

Class Method Summary collapse

Instance Method Summary collapse

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

.notify(reshare, _recipient_user_ids) ⇒ Object


17
18
19
20
21
22
# File 'app/models/notifications/reshared.rb', line 17

def self.notify(reshare, _recipient_user_ids)
  return unless reshare.root.present? && reshare.root.author.local?

  actor = reshare.author
  concatenate_or_create(reshare.root.author.owner, reshare.root, actor).try(:email_the_user, reshare, actor)
end

Instance Method Details

#deleted_translation_keyObject


13
14
15
# File 'app/models/notifications/reshared.rb', line 13

def deleted_translation_key
  "notifications.reshared_post_deleted"
end

#mail_jobObject


5
6
7
# File 'app/models/notifications/reshared.rb', line 5

def mail_job
  Workers::Mail::Reshared
end

9
10
11
# File 'app/models/notifications/reshared.rb', line 9

def popup_translation_key
  "notifications.reshared"
end