-
Notifications
You must be signed in to change notification settings - Fork 309
Fetch server emoji data (about Unicode emoji) #976
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! One comment below.
lib/api/model/initial_snapshot.dart
Outdated
@@ -68,6 +68,8 @@ class InitialSnapshot { | |||
|
|||
final int maxFileUploadSizeMib; | |||
|
|||
final Uri serverEmojiDataUrl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README still has our support threshold at server 4.0, so what we'd normally do is make this optional with a server-6 / FL 140 TODO, right, even if it only stays that way for a short time before we bump the threshold high enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, probably best to handle that explicitly. We can skip actually trying to provide data for those servers (since they're already out of the 18-month support window), though.
This is NFC because all existing call sites (all of which are in the other methods on this class) do always pass URLs that are based on realmUrl and preserve its origin.
This will let us reuse ApiConnection for some specialty endpoints that aren't authenticated (or don't use the normal Zulip auth mechanism).
We'll need another of these for fetching emoji data. Let's move them out from amidst all the main logic, to keep down the clutter.
This completes the data we'll need for use in zulip#669, which in turn will let us offer an emoji picker for reactions and for use inside message content. The doc on fetchEmojiData is based on a comment at the corresponding code in the legacy zulip-mobile app, in src/events/eventActions.js .
Thanks for the review! Pushed a revision. |
When you say "handle explicitly" in #976 (comment), do you mean making |
Oops, I didn't push my latest revision. 🙂 Pushed now. |
Thanks! LGTM; please merge at will once CI has passed. |
Stacked atop #975.
This completes the data we'll need for use in #669.