fix: non-compliant Mastodon Account endpoints#365
Draft
DataDrivenMD wants to merge 6 commits intocloudflare:mainfrom
Draft
fix: non-compliant Mastodon Account endpoints#365DataDrivenMD wants to merge 6 commits intocloudflare:mainfrom
DataDrivenMD wants to merge 6 commits intocloudflare:mainfrom
Conversation
This also refactors several tests previously under the `/api/v1/accounts/:id` endpoint to the newly-implemented `/api/v1/accounts/lookup` endpoint. This was done in order to be in compliance with Mastodon API specification
- [X] Generate a Mastodon account ID when an AP actor is added to the `actors` table - [X] Ensure that every entry in the actors table has a `mastodon_id` - [ ] Update the code in wildebeest/functions/api/v1/accounts/[id].ts and wildebeest/functions/api/v1/accounts/[id]/*.ts so that they actually use the Mastodon Account ID instead of the ActivityPub actor ID because as things stand now, the implementation is not-compliant with the Mastodon API spec, and it's breaking compatibility with several popular 3rd-party apps - [ ] Update test suite /api/v1/accounts/:id endpoints
DataDrivenMD
commented
Mar 4, 2023
| status.reblog = { | ||
| ...status, | ||
| account, | ||
| account: mastodonAccount, |
Contributor
Author
There was a problem hiding this comment.
Note: rest property must be the last in the pattern, and must not have a trailing comma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Completed
Accountentity/api/v1/accounts/lookupendpoint, which was previously missing, and was contributing to various 3rd-party app incompatibilities. With these changes, I was able to refactor the accounts test suite, which was necessary because 3 tests were miscategorized as belonging to/api/v1/accounts/:idwhen they should have actually been tests for/api/v1/accounts/lookup.actorstable and add amastodon_idto any preexisting entry in theactorstable as it is retrieved (DB migration not possible in this setting because the value is derived using JS due to SQLite lacking the extensions necessary to build the user-defined function). Again, this is necessary for compatibility with 3rd-party apps and for compliance with Mastodon API specs.WIP
wildebeest/functions/api/v1/accounts/[id].tsandwildebeest/functions/api/v1/accounts/[id]/*.tsso that they actually use the Mastodon Account ID instead of the ActivityPub actor ID because as things stand now, the implementation is not-compliant with the Mastodon API spec, and it's breaking compatibility with several popular 3rd-party apps/api/v1/accounts/:idendpointscc @xtuc