We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8a3ea0 commit 6dcb602Copy full SHA for 6dcb602
lib/api/model/events.dart
@@ -438,8 +438,15 @@ class DeleteMessageEvent extends Event {
438
this.topic,
439
});
440
441
- factory DeleteMessageEvent.fromJson(Map<String, dynamic> json) =>
442
- _$DeleteMessageEventFromJson(json);
+ factory DeleteMessageEvent.fromJson(Map<String, dynamic> json) {
+ final result = _$DeleteMessageEventFromJson(json);
443
+ // Crunchy-shell validation
444
+ if (result.messageType == MessageType.stream) {
445
+ result.streamId as int;
446
+ result.topic as String;
447
+ }
448
+ return result;
449
450
451
@override
452
Map<String, dynamic> toJson() => _$DeleteMessageEventToJson(this);
0 commit comments