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

Merge different delete activities for better compatibility (fixes #2066) #2073

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Jan 28, 2022

Lemmy has Delete.object like this:

  "object": {
    "id": "http://ds9.lemmy.ml/post/1",
    "type": "Tombstone"
  },

While Pleroma uses:

  "object": "https://greenish.red/objects/38e2b983-ebf5-4387-9bc2-3b80305469c9",

Our approach doesnt make much sense, because all we really care about is the object id. For now i'm making a backwards compatible change to accept both types of deletes, but for 0.16 we should remove the compat code and do it just like Pleroma.

@Nutomic
Copy link
Member Author

Nutomic commented Jan 29, 2022

Added a second commit which makes the breaking change to remove the compatibility code. Dont squash this, the first commit should be cherry-picked into 0.15.3, while the second commit should be released with 0.16.0

Edit: I think the test failure is because Delete and DeletePrivateMessage have the exact same structure now, so the json can get parsed into the wrong struct. To solve this we will have to merge both structs into one, which means that this will require a bigger rewrite.

@Nutomic Nutomic marked this pull request as draft January 29, 2022 22:27
@Nutomic Nutomic force-pushed the pleroma-deletes branch 5 times, most recently from 0a12c2d to d00a0b5 Compare February 9, 2022 21:16
@Nutomic Nutomic changed the title Accept Pleroma delete activity (fixes #2066) Merge different delete activities for better compatibility (fixes #2066) Feb 9, 2022
@Nutomic Nutomic marked this pull request as ready for review February 9, 2022 21:17
@dessalines dessalines merged commit 788924d into main Feb 14, 2022
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.

2 participants