Class: Notifications::PrivateMessage

Inherits:
Notification
  • Object
show all
Defined in:
app/models/notifications/private_message.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.make_notification(recipient, target, actor, notification_type) ⇒ Object


8
9
10
11
12
13
14
# File 'app/models/notifications/private_message.rb', line 8

def self.make_notification(recipient, target, actor, notification_type)
  n = notification_type.new(:target => target,
                             :recipient_id => recipient.id)
  target.increase_unread(recipient)
  n.actors << actor
  n
end

Instance Method Details

#mail_jobObject


2
3
4
# File 'app/models/notifications/private_message.rb', line 2

def mail_job
  Workers::Mail::PrivateMessage
end

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

def popup_translation_key
  'notifications.private_message'
end