Implement backfilling statuses thru scheduled_at #3685
+434
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request overloads
scheduled_at
to allow creating statuses with creation times and ULIDs backdated to a previous time inscheduled_at
, with the following caveats:Context
This feature is intended to allow external tools to import statuses from previous instances. The only difference between a backfilled status vs. simply reposting the same text and attachments as the original post is that backfilled statuses are quieter and have the original posting date. They don't have the same URLs or IDs as the original posts.
Non-features
This PR doesn't implement scheduling statuses to be posted in the future, but it shouldn't break anything we'd need for that.
This PR doesn't implement any import functionality that would let users upload a Mastodon, etc. archive directly. Importing foreign formats would be handled by external tools calling the existing GTS API, plus this modified status-create API method. (I'll do a PoC with
slurp
at some point.)This PR doesn't attempt to backdate the ULIDs of status-linked objects such as media attachments, only the ULID of the status itself.
Checklist
go fmt ./...
andgolangci-lint run
.