Flake Ids for Users and Activities
This commit is contained in:
parent
b624b7a150
commit
28d77e373c
17 changed files with 264 additions and 32 deletions
|
|
@ -900,15 +900,10 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
|
||||
maybe_retire_websub(user.ap_id)
|
||||
|
||||
# Only do this for recent activties, don't go through the whole db.
|
||||
# Only look at the last 1000 activities.
|
||||
since = (Repo.aggregate(Activity, :max, :id) || 0) - 1_000
|
||||
|
||||
q =
|
||||
from(
|
||||
a in Activity,
|
||||
where: ^old_follower_address in a.recipients,
|
||||
where: a.id > ^since,
|
||||
update: [
|
||||
set: [
|
||||
recipients:
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"partOf" => iri,
|
||||
"totalItems" => info.note_count,
|
||||
"orderedItems" => collection,
|
||||
"next" => "#{iri}?max_id=#{min_id - 1}"
|
||||
"next" => "#{iri}?max_id=#{min_id}"
|
||||
}
|
||||
|
||||
if max_qid == nil do
|
||||
|
|
@ -207,7 +207,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"partOf" => iri,
|
||||
"totalItems" => -1,
|
||||
"orderedItems" => collection,
|
||||
"next" => "#{iri}?max_id=#{min_id - 1}"
|
||||
"next" => "#{iri}?max_id=#{min_id}"
|
||||
}
|
||||
|
||||
if max_qid == nil do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue