Class: ActivityPub::Projects::ReleasesUnfollowService

Inherits:
ReleasesSubscriptionService show all
Defined in:
app/services/activity_pub/projects/releases_unfollow_service.rb

Instance Attribute Summary

Attributes inherited from ReleasesSubscriptionService

#errors

Instance Method Summary collapse

Methods inherited from ReleasesSubscriptionService

#initialize

Constructor Details

This class inherits a constructor from ActivityPub::Projects::ReleasesSubscriptionService

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
15
# File 'app/services/activity_pub/projects/releases_unfollow_service.rb', line 6

def execute
  unless subscriber_url
    errors << "You need to provide an actor id for your unsubscribe activity"
    return false
  end

  return true unless previous_subscription.present?

  previous_subscription.destroy
end