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

fix: update @context property append #67

Open
wants to merge 1 commit into
base: activitypub
Choose a base branch
from

Conversation

julianlam
Copy link
Member

@julianlam julianlam commented Nov 13, 2024

The @context property can be a number of types, either a string, or an array containing either strings, or objects.

I don't know how to accurately specify the type without causing warnings in the type-checking logic below, but this is likely due to inexperience, hence why unknown is used.

Original requirement read:

Add the following to object.@context: { "Emoji": "http://joinmastodon.org/ns#Emoji" }

Should read

Append the following to object.@context: { toot: "http://joinmastodon.org/ns#", "Emoji": "toot:Emoji" }

@julianlam
Copy link
Member Author

Per this topic, it's ok to just append without checking if a similarly namespaced object exists, so no additional logic is necessary, I'll remove the comment within.

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