Set snowflake IDs for backdated statuses (#5260)
- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity - Skip for statuses coming from inbox, aka delivered in real-time - Skip for statuses that claim to be from the future
This commit is contained in:
parent
6e4046fc3f
commit
0717d9b3e6
16 changed files with 83 additions and 43 deletions
|
@ -3,9 +3,10 @@
|
|||
class ActivityPub::ProcessCollectionService < BaseService
|
||||
include JsonLdHelper
|
||||
|
||||
def call(body, account)
|
||||
def call(body, account, options = {})
|
||||
@account = account
|
||||
@json = Oj.load(body, mode: :strict)
|
||||
@options = options
|
||||
|
||||
return unless supported_context?
|
||||
return if different_actor? && verify_account!.nil?
|
||||
|
@ -38,7 +39,7 @@ class ActivityPub::ProcessCollectionService < BaseService
|
|||
end
|
||||
|
||||
def process_item(item)
|
||||
activity = ActivityPub::Activity.factory(item, @account)
|
||||
activity = ActivityPub::Activity.factory(item, @account, @options)
|
||||
activity&.perform
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue