Accept ActivityPub announce from the author of the original note (#6236)
parent
081ba8fc90
commit
3cd3cae7f7
|
@ -15,7 +15,8 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
|
||||||
account: @account,
|
account: @account,
|
||||||
reblog: original_status,
|
reblog: original_status,
|
||||||
uri: @json['id'],
|
uri: @json['id'],
|
||||||
created_at: @options[:override_timestamps] ? nil : @json['published']
|
created_at: @options[:override_timestamps] ? nil : @json['published'],
|
||||||
|
visibility: original_status.visibility
|
||||||
)
|
)
|
||||||
|
|
||||||
distribute(status)
|
distribute(status)
|
||||||
|
@ -35,6 +36,6 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
|
||||||
end
|
end
|
||||||
|
|
||||||
def announceable?(status)
|
def announceable?(status)
|
||||||
status.public_visibility? || status.unlisted_visibility?
|
status.account_id == @account.id || status.public_visibility? || status.unlisted_visibility?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue