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

Prepare for tombstone support #183

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Prepare for tombstone support #183

merged 1 commit into from
Oct 31, 2023

Conversation

melroy89
Copy link
Member

@melroy89 melroy89 commented Oct 31, 2023

  • Do not fail on 410 status code (used for Tombstone)
  • Read also 410 error status HTTP content (which contains the tombstone object), passing false to getContent()
  • Do not throw error / 500 error message

@melroy89 melroy89 added enhancement New feature or request activitypub ActivityPub related issues backend Backend related issues and pull requests labels Oct 31, 2023
@melroy89
Copy link
Member Author

melroy89 commented Oct 31, 2023

You wanna test? sure try this tombstone url: https://lemm.ee/post/2871450

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "lemmy": "https://join-lemmy.org/ns#",
      "litepub": "http://litepub.social/ns#",
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "ChatMessage": "litepub:ChatMessage",
      "commentsEnabled": "pt:commentsEnabled",
      "sensitive": "as:sensitive",
      "matrixUserId": "lemmy:matrixUserId",
      "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
      "removeData": "lemmy:removeData",
      "stickied": "lemmy:stickied",
      "moderators": {
        "@type": "@id",
        "@id": "lemmy:moderators"
      },
      "expires": "as:endTime",
      "distinguished": "lemmy:distinguished",
      "language": "sc:inLanguage",
      "identifier": "sc:identifier"
    }
  ],
  "id": "https://lemm.ee/post/2871450",
  "type": "Tombstone"
}

Copy link
Member

@nobodyatroot nobodyatroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less 500s, more better.

@melroy89
Copy link
Member Author

We still need to improve the fetching (making it blocking fetch) and after that, we can improve the frontend, informing the user that this post/thread/.. is no longer there in case of a tombstone.

@melroy89 melroy89 merged commit 7096144 into main Oct 31, 2023
6 checks passed
@melroy89 melroy89 deleted the prepare_for_tombstone branch October 31, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants