scinote-web/app/notifications/recipients/designate_to_my_module_recipients.rb

18 lines
384 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Recipients
class DesignateToMyModuleRecipients < MyModuleDesignatedRecipients
private
def activity_recipients
activity = Activity.find(@params[:activity_id])
user = User.find_by(id: activity.values.dig('message_items', 'user_target', 'id'))
return [] if user.id == activity.owner_id
[user]
end
end
end