Conversation
… page, since that may not be needed?
|
hey it seems like you're missing a changeset. Can you please add a changeset, as described here https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md#documenting-a-change Thank you :3 |
|
thanks for the heads up, I completely missed it. should be done now! |
| const filename = `${gif.title}.gif`; | ||
| const file = new File([uint8Array], filename, { type: 'image/gif' }); | ||
|
|
||
| // Upload to Matrix |
There was a problem hiding this comment.
up for debate imo is, if we want to reupload the gif to the hs, or use something like https://github.com/maunium/stickerpicker/tree/master/giphyproxy
(as discussed, but afaik not resolved in the sable client matrix room)
| # pre-commit | ||
| .pre-commit-config.yaml | ||
| CLAUDE.md | ||
| .github/AGENTS.md |
|
I think if we going to add this, might as well go with KLIPY, right off the bat. You can get a dev key on their website and later we can contact for a prod key. It seems to be free and we just have to respect their API rate limits. |
|
Unless you doing server level caching, I don't see a reason for a proxy in this case. I guess you can avoid shipping the secrets in the client. Commet's proxy is just a cloudflare worker, which is fine but we are currently on the free tier of cloudflare which has 100k daily requests limit (if we were to host it ourselves) @7w1 thoughts? |
The homeserver by default does caching for remote media. Which would be utilized with that proxy. And cached remote media is easily purgeable, while re-uploaded media is harder to manage and will easily get out of hand. Especially for bigger Homeservers the way to go would be the proxy, it would by its nature alone solve the issue of duplicated gifs taking up too much space in the media repository. btw comments proxy does afaict way differs things than the maunium sticker picker proxy |
|
Maunium's proxy makes sense to me since it essentially acts like a homeserver and allows other homeservers to cache data and embed smoothly without needing to be reuploaded by everyone. |
Description
Fixes #60 after all TODOs below have been completed.
Open Problems
The approach for sending GIFs is to download the GIF data and then re upload them as a sticker.
This PR was heavily inspired by cinnyapp/cinny#2392, so if possible @razn-v should give their input and be added as a co-contributor.
Type of change
Checklist:
AI disclosure:
The changes to renderItem() to support GIFs were AI generated. It returns GIF Items and ensures they are scaled properly.