mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-03 17:56:26 +01:00
Fix #522 - prevent blocked users from reblogging
This commit is contained in:
parent
ca28d9c2ae
commit
10ffd455a8
@ -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: '')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user