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