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 @@ -855,16 +855,13 @@ enum MessageEditState {
855
855
continue ;
856
856
}
857
857
858
- // TODO(server-5) prev_subject was the old name of prev_topic on pre-5.0 servers
859
- final prevTopic = (entry['prev_topic' ] ?? entry['prev_subject' ]) as String ? ;
858
+ final prevTopic = entry['prev_topic' ] as String ? ;
860
859
final topic = entry['topic' ] as String ? ;
861
- if (prevTopic != null ) {
862
- // TODO(server-5) pre-5.0 servers do not have the 'topic' field
863
- if (topic == null ) {
864
- hasMoved = true ;
865
- } else {
866
- hasMoved | = ! topicMoveWasResolveOrUnresolve (topic, prevTopic);
867
- }
860
+ if (topic != null || prevTopic != null ) {
861
+ // Crunchy-shell validation: Both are present if the topic was edited
862
+ topic as String ;
863
+ prevTopic as String ;
864
+ hasMoved | = ! topicMoveWasResolveOrUnresolve (topic, prevTopic);
868
865
}
869
866
}
870
867
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