Class: ActivityPub::Projects::ReleasesFollowService
- Inherits:
-
ReleasesSubscriptionService
- Object
- ReleasesSubscriptionService
- ActivityPub::Projects::ReleasesFollowService
- Defined in:
- app/services/activity_pub/projects/releases_follow_service.rb
Instance Attribute Summary
Attributes inherited from ReleasesSubscriptionService
Instance Method Summary collapse
Methods inherited from ReleasesSubscriptionService
Constructor Details
This class inherits a constructor from ActivityPub::Projects::ReleasesSubscriptionService
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/services/activity_pub/projects/releases_follow_service.rb', line 6 def execute unless subscriber_url errors << "You need to provide an actor id for your subscriber" return false end return true if previous_subscription.present? subscription = ReleasesSubscription.new( subscriber_url: subscriber_url, subscriber_inbox_url: subscriber_inbox_url, payload: payload, project: project ) unless subscription.save errors.concat(subscription.errors.) return false end enqueue_subscription(subscription) true end |