Skip to content

Support receiving more formats of GIF message#342

Merged
zjs81 merged 5 commits into
zjs81:mainfrom
interfect:graceful-gif-render
Apr 6, 2026
Merged

Support receiving more formats of GIF message#342
zjs81 merged 5 commits into
zjs81:mainfrom
interfect:graceful-gif-render

Conversation

@interfect

Copy link
Copy Markdown
Contributor

This does about half of #341. In addition to g:GIFID messages, this allows parsing messages consisting entirely of a single Giphy URL as GIF messages, by extracting the GIF ID from the URL.

To do this, I unified the three copies of GIF message parsing into one, in a new GifHelper class modeled on the ReactionHelper.

I also gave both the GifHelper and ReactionHelper the responsibility of encoding as well as parsing their message types, since it seemed to make the most sense to have the encoding and decoding sides together where they can both be worked on at once.

This adds Giphy page URLs and `media.giphy.com` URLs (with and without
protocols) as *accepted* encodings for GIF messages, alongside the `g:`
syntax.

When someone posts such a URL by itself as a message, it will be rendered inline just like `g:` messages are now.

This does not change the encoding that GIF messages are *sent* in; that
is still the `g:` syntax.
@zjs81

zjs81 commented Apr 6, 2026

Copy link
Copy Markdown
Owner

@codex review

@zjs81

zjs81 commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Very Nice! I will do some testing and get it merged in a few hours. Thank you.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5ec60638c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/screens/chat_screen.dart
@zjs81 zjs81 merged commit c7933d3 into zjs81:main Apr 6, 2026
5 of 6 checks passed
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.

2 participants