diaspora/app/models/notifications/started_sharing.rb
2017-09-17 19:29:15 +02:00

22 lines
481 B
Ruby

# frozen_string_literal: true
module Notifications
class StartedSharing < Notification
def mail_job
Workers::Mail::StartedSharing
end
def popup_translation_key
"notifications.started_sharing"
end
def self.notify(contact, _recipient_user_ids)
sender = contact.person
create_notification(contact.user, sender, sender).try(:email_the_user, sender, sender)
end
def contact
recipient.contact_for(target)
end
end
end