File tree 2 files changed +6
-19
lines changed
2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -826,16 +826,13 @@ enum MessageEditState {
826
826
continue ;
827
827
}
828
828
829
- // TODO(server-5) prev_subject was the old name of prev_topic on pre-5.0 servers
830
- final prevTopic = (entry['prev_topic' ] ?? entry['prev_subject' ]) as String ? ;
829
+ final prevTopic = entry['prev_topic' ] as String ? ;
831
830
final topic = entry['topic' ] as String ? ;
832
- if (prevTopic != null ) {
833
- // TODO(server-5) pre-5.0 servers do not have the 'topic' field
834
- if (topic == null ) {
835
- hasMoved = true ;
836
- } else {
837
- hasMoved | = ! topicMoveWasResolveOrUnresolve (topic, prevTopic);
838
- }
831
+ if (topic != null || prevTopic != null ) {
832
+ // Crunchy-shell validation: Both are present if the topic was edited
833
+ topic as String ;
834
+ prevTopic as String ;
835
+ hasMoved | = ! topicMoveWasResolveOrUnresolve (topic, prevTopic);
839
836
}
840
837
}
841
838
Original file line number Diff line number Diff line change @@ -284,16 +284,6 @@ void main() {
284
284
checkEditState (MessageEditState .edited,
285
285
[{'prev_content' : 'old_content' }]);
286
286
});
287
-
288
- test ("'prev_topic' present without the 'topic' field -> moved" , () {
289
- checkEditState (MessageEditState .moved,
290
- [{'prev_topic' : 'old_topic' }]);
291
- });
292
-
293
- test ("'prev_subject' present from a pre-5.0 server -> moved" , () {
294
- checkEditState (MessageEditState .moved,
295
- [{'prev_subject' : 'old_topic' }]);
296
- });
297
287
});
298
288
299
289
group ('topic resolved in edit history' , () {
You can’t perform that action at this time.
0 commit comments