Class: Notifications::PrivateMessage

Inherits:
Notification show all
Defined in:
app/models/notifications/private_message.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(object, _recipient_user_ids) ⇒ Object


13
14
15
16
17
18
19
20
# File 'app/models/notifications/private_message.rb', line 13

def self.notify(object, _recipient_user_ids)
  case object
  when Conversation
    object.messages.each {|message| notify_message(message) }
  when Message
    notify_message(object)
  end
end

Instance Method Details

#mail_jobObject


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

def mail_job
  Workers::Mail::PrivateMessage
end

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

def popup_translation_key
  "notifications.private_message"
end