You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
303 B

  1. class UnfavouriteService < BaseService
  2. def call(account, status)
  3. favourite = Favourite.find_by!(account: account, status: status)
  4. favourite.destroy!
  5. unless status.local?
  6. NotificationWorker.perform_async(favourite.stream_entry.id, status.account_id)
  7. end
  8. favourite
  9. end
  10. end