Sha256: 6144549a57bd53c1b8c2309c2cd90490e578ad0989e36ffe5e41df78fc0a281e

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

# A specific job to log a user following another user to a user's activity stream
class UserFollowEventJob < EventJob
  attr_accessor :followee_id
  alias_attribute :follower_id, :depositor_id

  def initialize(follower_id, followee_id)
    super(follower_id)
    @followee_id = followee_id
  end

  def run
    super
    # Fan out the event to followee
    followee = User.find_by_user_key(followee_id)
    followee.log_event(event)
  end

  def action
    @action ||= "User #{link_to_profile follower_id} is now following #{link_to_profile followee_id}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sufia-6.7.0 app/jobs/user_follow_event_job.rb
sufia-6.6.1 app/jobs/user_follow_event_job.rb
sufia-6.6.0 app/jobs/user_follow_event_job.rb
sufia-6.5.0 app/jobs/user_follow_event_job.rb
sufia-6.4.0 app/jobs/user_follow_event_job.rb