Skip to content

Commit 9f560fa

Browse files
committed
api: Allow SubscriptionUpdateEvent with unrecognized property
Our event poll shouldn't crash on subscription/update events about data that we don't store and act on. This bugfix allows servers to add new Subscription fields and send corresponding events without causing the app to discard its data and reregister a new event queue. There's one field we'd like to remove code for, in_home_view, which was deprecated in FL 139 but is still sent (as of CZO on 2025-10-03) alongside an event with the modern is_muted field. This change prepares for that by gracefully ignoring SubscriptionProperty.unknown, which will be how in_home_view gets represented.
1 parent 0c61d84 commit 9f560fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/api/model/events.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ class SubscriptionUpdateEvent extends SubscriptionEvent {
762762

763763
final int streamId;
764764

765+
@JsonKey(unknownEnumValue: SubscriptionProperty.unknown)
765766
final SubscriptionProperty property;
766767

767768
/// The new value, or null if we don't recognize the setting.

lib/api/model/events.g.dart

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)