FEP-8fcf rests for two weeks after a restore
What a restore lost of either side is not the other server's to mend: for RestoreRecord.FollowersGrace (14 days) deliveries carry no Collection-Synchronization header, and a follow only the remote remembers is adopted rather than undone. Without a restore nothing changes; the interop sweep (gts, mastodon, misskey, sharkey, akkoma, pixelfed, smithereen, followsync, pins, moves) passed, Smithereen's poll check on a second run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
bc5f2beaf7
commit
9ad96f560d
3 files changed
+21
-4
No files matched your search
@@ -21,7 +21,8 @@ namespace PrivaPub.Federation.Actors
|
||||
// FEP-8fcf, received: an account elsewhere tells, with its delivery, a digest of its followers here. When the personas
|
||||
// following it here digest otherwise, its partial list (read signed by the instance actor) says who they are: a follow
|
||||
// only PrivaPub remembers ends, a request it answered without our knowing is accepted, and a follow only it remembers
|
||||
// is undone by the persona, as Mastodon does. A follow ends only when the list is the one the digest describes.
|
||||
// is undone by the persona, as Mastodon does, or kept within RestoreRecord.FollowersGrace of a restore, which may have
|
||||
// lost it. A follow ends only when the list is the one the digest describes.
|
||||
public class FollowingSynchronization : IJobHandler
|
||||
{
|
||||
const int MaxPages = 10;
|
||||
@@ -87,6 +88,19 @@ namespace PrivaPub.Federation.Actors
|
||||
}
|
||||
if (await _localActors.FindByUri(uri, token) is not { Kind: LocalActorKind.Person } stranger)
|
||||
continue;
|
||||
// a follow the restore lost: kept, not undone
|
||||
if (await Infrastructure.Backup.RestoreRecord.InFollowersGrace(token))
|
||||
{
|
||||
await DB.Default.SaveAsync(new Following
|
||||
{
|
||||
AvatarId = stranger.Id,
|
||||
TargetActorURI = actor.ActorURI,
|
||||
TargetAccountId = actor.ID,
|
||||
TargetInboxURL = string.IsNullOrEmpty(actor.InboxURL) ? actor.SharedInboxURL : actor.InboxURL,
|
||||
State = FollowState.Accepted
|
||||
}, token);
|
||||
continue;
|
||||
}
|
||||
// (it has no id for a follow PrivaPub never made; it is undone by actor and object)
|
||||
var undo = new JsonObject
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user