@@ -811,27 +811,19 @@ class UpdateMessageMoveData {
811
811
return null ;
812
812
}
813
813
814
- if (origStreamId == null || newStreamId == null ) {
814
+ return UpdateMessageMoveData (
815
815
// The `stream_id` field (aka origStreamId) is documented to be present on moves;
816
816
// newStreamId should not be null either because it falls back to origStreamId.
817
- throw FormatException ('Malformed UpdateMessageEvent: move but no origStreamId' );
818
- }
819
- if (origTopic == null || newTopic == null ) {
820
- // The `orig_subject` field (aka origTopic) is documented to be present on moves;
821
- // newTopic should not be null either because it falls back to origTopic.
822
- throw FormatException ('Malformed UpdateMessageEvent: move but no origTopic' );
823
- }
824
- if (propagateMode == null ) {
817
+ origStreamId: origStreamId! ,
818
+ newStreamId: newStreamId! ,
819
+
825
820
// The `propagate_mode` field (aka propagateMode) is documented to be present on moves.
826
- throw FormatException ('Malformed UpdateMessageEvent: move but no propagateMode' );
827
- }
821
+ propagateMode: propagateMode! ,
828
822
829
- return UpdateMessageMoveData (
830
- origStreamId: origStreamId,
831
- newStreamId: newStreamId,
832
- propagateMode: propagateMode,
833
- origTopic: origTopic,
834
- newTopic: newTopic,
823
+ // The `orig_subject` field (aka origTopic) is documented to be present on moves;
824
+ // newTopic should not be null either because it falls back to origTopic.
825
+ origTopic: origTopic! ,
826
+ newTopic: newTopic! ,
835
827
);
836
828
}
837
829
}
0 commit comments