mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
Add notes to blocks (#193)
In this commit, we also push note creation into the AccountInteractions concern, where we can: 1. create and persist model objects inside transactions without having to include job queuing inside the transaction 2. commonize the don't-add-a-blank-note check Finally, this commit resolves a invocation-on-nil in REST::RelationshipSerializer.
This commit is contained in:
@@ -21,7 +21,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||
end
|
||||
|
||||
def block
|
||||
BlockService.new.call(current_user.account, @account)
|
||||
BlockService.new.call(current_user.account, @account, note: params[:note])
|
||||
render json: @account, serializer: REST::RelationshipSerializer, relationships: relationships
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user