feat(gif): migrate GIF picker to Giphy (Tenor API shutdown) [operator-action] (LC-505) #470
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-505-gif-giphy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Migrate the GIF picker (LC-488, merged in #469) off the Tenor API, which Google is shutting down (announced 2026-01-13: new API-key sign-ups halted immediately, full shutdown 2026-06-30 - a new operator can no longer get a Tenor key). Re-target to Giphy (Shutterstock-owned, still operational, free keys).
How
Only the provider adapter changes; the architecture (search -> server-side fetch -> uploads pipeline -> same-origin attachment, never hotlinked) is identical.
gif::GifConfig::from_env:LETS_CHAT_GIPHY_API_KEY(+ optionalLETS_CHAT_GIPHY_RATINGg/pg/pg-13/r, default pg-13). Replaces the Tenor key/client-key/content-filter trio.gif::parse_search: Giphydata[].imagesshape -fixed_height_smallfor the grid preview,downsized(fallbackoriginal) for the posted GIF.gif::is_giphy_media_url: allowlist*.giphy.com(was*.tenor.com).api.giphy.com/v1/gifs/{trending|search}withapi_key/rating/limit/q.Tests
gif.rsunit tests rewritten for the Giphy response shape +is_giphy_media_url(incl. look-alike host rejection).just check,just test,just test-saasgreen. (The outbound HTTP path remains non-mockable in-process, as before.)Operator note
[operator-action]: setLETS_CHAT_GIPHY_API_KEYinstead of the oldLETS_CHAT_TENOR_*vars. The Tenor vars are now ignored; the picker stays hidden until a Giphy key is set.Verify
just verifybuilds the release binary clean; boot fails only on the missing SSO env (environmental).