diff --git a/app/controllers/api/v1/statuses/reactions_controller.rb b/app/controllers/api/v1/statuses/reactions_controller.rb index f7dc2f99ce..db43346def 100644 --- a/app/controllers/api/v1/statuses/reactions_controller.rb +++ b/app/controllers/api/v1/statuses/reactions_controller.rb @@ -8,12 +8,12 @@ class Api::V1::Statuses::ReactionsController < Api::BaseController before_action :set_reaction, except: :update def update - StatusReactionService.new.call(current_account, @status, params[:id]) + ReactService.new.call(current_account, @status, params[:id]) render_empty end def destroy - StatusUnreactionService.new.call(current_account, @status) + UnreactService.new.call(current_account, @status) render_empty end diff --git a/app/serializers/activitypub/emoji_reaction_serializer.rb b/app/serializers/activitypub/emoji_reaction_serializer.rb index b4111150a4..50f3efa3cb 100644 --- a/app/serializers/activitypub/emoji_reaction_serializer.rb +++ b/app/serializers/activitypub/emoji_reaction_serializer.rb @@ -30,7 +30,5 @@ class ActivityPub::EmojiReactionSerializer < ActivityPub::Serializer end end - def reaction - content - end + alias reaction content end diff --git a/app/services/status_reaction_service.rb b/app/services/react_service.rb similarity index 95% rename from app/services/status_reaction_service.rb rename to app/services/react_service.rb index 9451690dd1..773dd3fd6c 100644 --- a/app/services/status_reaction_service.rb +++ b/app/services/react_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class StatusReactionService < BaseService +class ReactService < BaseService include Authorization include Payloadable diff --git a/app/services/status_unreaction_service.rb b/app/services/unreact_service.rb similarity index 92% rename from app/services/status_unreaction_service.rb rename to app/services/unreact_service.rb index 13c3c428db..ebc270383c 100644 --- a/app/services/status_unreaction_service.rb +++ b/app/services/unreact_service.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class StatusUnreactionService < BaseService +class UnreactService < BaseService include Payloadable def call(account, status)