-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
[feature] PATCH /api/v1/admin/custom_emojis/{id}
endpoint
#1061
Conversation
There's two things I'm still uncertain about:
|
Can we do that automatically? PATCH shortcode change > return updated emoji with a new ID too
What makes this harder to re-enable? |
basically it means we gotta go through and recreate all the links we deleted, in order for the disabled+re-enabled emojis to once again be returned properly attached to statuses via the api
mmmmm maybe 🤔 i can play around with that I think this will always be a bit difficult though. Say you've got a status like So this situation isn't actually mitigated by deleting and replacing the emoji so that it has id |
Is this ready to review @tsmethurst ? Just judging based on that last reply ^. Though to go back to your previous comment, I think making admins delete->recreate would be my preferred method of handling emoji shortcode changes. It saves us having to deal with odd situations on the backend, and it makes it more clear that if you rename an emoji shortcode that existing statuses will have broken shortcodes. Going back and updating them all is definitely out of the question IMO, as it would either mean having to send out a tonne of AP update events to keep remote copies in line with ours, or remote copies just wouldn't be inline with our local status copy (which also doesn't seem great) |
Alrighty, I removed the ability to update shortcodes cuz yeah, it's gonna cause nothing but headaches 😬 So this is ready to review! :) The only thing still missing, i'd say, is going back through statuses and updating the emojiIDs on them when an emoji is deleted. But this is not a big deal for now I think, since the serialization stuff will just skip over the emoji if there's an error getting it: https://github.com/superseriousbusiness/gotosocial/blob/main/internal/typeutils/internaltofrontend.go#L607 |
I'm going to merge this now, but do you want to make a ticket for this remaining task at some point ^ |
The new PATCH endpoint allows instance admins to:
copy
a remote emoji to local storage.modify
a local emoji with a new image, shortcode, and/or category.disable
a remote emoji, preventing it from being used on the instance.finishes / closes #797
finishes / closes #821