Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement backfilling statuses thru scheduled_at #3685

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

VyrCossont
Copy link
Contributor

@VyrCossont VyrCossont commented Jan 26, 2025

Description

This pull request overloads scheduled_at to allow creating statuses with creation times and ULIDs backdated to a previous time in scheduled_at, with the following caveats:

  • Backfilled statuses aren't inserted into home or list timelines on the instance, and don't generate notifications
  • Backfilled statuses aren't pushed to other instances through federation (but may be federated normally later through boosts, searches, etc.)
  • Backfilled statuses may only mention or reply to the account creating them
  • Backfilled statuses can't contain polls

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

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. (2024-07-04)
  • I/we have not leveraged AI to create the proposed changes.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

@VyrCossont VyrCossont marked this pull request as ready for review January 26, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant