-
Notifications
You must be signed in to change notification settings - Fork 350
Description
The Emojiset enum, corresponding to the "emojiset" user setting (search for "emojiset" at https://zulip.com/api/register-queue ), accepts a handful of known values. If the server sends an unexpected value in register-queue, the app will reject it as malformed.
We might soon want to add a different value: #api design > Using system emoji @ 💬. It'd therefore be best if the app accepted unknown values for this setting.
We already don't act on the difference between three of the four possible values — we treat them all the same, and only distinguish the "text" value of the setting. If we see an unexpected value, it should be treated the same as the others apart from "text". (Effectively we'll be assuming that for any future API change that introduces a new value here, ignoring the new value and treating it the same as the current default/typical value will be better than refusing to act on that account at all.)
Implementation
Use JsonKey.unknownEnumValue. Search the existing code for examples, and follow those examples.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status