Skip to content
Snippets Groups Projects
Commit 10ffd455 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Fix #522 - prevent blocked users from reblogging

parent ca28d9c2
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,9 @@ class ReblogService < BaseService
# @param [Status] reblogged_status Status to be reblogged
# @return [Status]
def call(account, reblogged_status)
raise Mastodon::NotPermitted if reblogged_status.private_visibility?
reblogged_status = reblogged_status.reblog if reblogged_status.reblog?
raise Mastodon::NotPermitted if reblogged_status.private_visibility? || !reblogged_status.permitted?(account)
reblog = account.statuses.create!(reblog: reblogged_status, text: '')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment