diff --git a/lib/core/models/available_servers.dart b/lib/core/models/available_servers.dart index d6e4e92eab..b8a8510af2 100644 --- a/lib/core/models/available_servers.dart +++ b/lib/core/models/available_servers.dart @@ -268,7 +268,7 @@ class SelectionHistory { ); /// Timestamp of one `user_failures` entry, or null if it has none we can - /// read. lantern-box v0.0.104 changed each entry from a bare RFC3339 string + /// read. lantern-box v0.0.101 changed each entry from a bare RFC3339 string /// to a `{"at": ..., "kind": ...}` object; both are accepted so this parses /// against either version, matching Go's `UserFailure.UnmarshalJSON`. /// Unreadable entries are dropped rather than thrown on: one entry in the @@ -285,7 +285,7 @@ class SelectionHistory { if (lastOutcomeAt != null) "last_outcome_at": lastOutcomeAt!.toIso8601String(), "consecutive_failures": consecutiveFailures, - // Bare timestamps, i.e. the pre-v0.0.104 shape, which Go still accepts. + // Bare timestamps, i.e. the pre-v0.0.101 shape, which Go still accepts. // Nothing sends this back to Go today; emitting the object form would mean // inventing a `kind` we never parsed. if (userFailures.isNotEmpty) diff --git a/test/core/models/available_servers_test.dart b/test/core/models/available_servers_test.dart index 2316e9b16d..7b700d9422 100644 --- a/test/core/models/available_servers_test.dart +++ b/test/core/models/available_servers_test.dart @@ -263,10 +263,10 @@ void main() { }); group('user_failures deserialization', () { - // lantern-box v0.0.104 changed each entry from a bare RFC3339 timestamp to + // lantern-box v0.0.101 changed each entry from a bare RFC3339 timestamp to // a {"at": ..., "kind": ...} object. Both have to parse: the object form is // what current lantern-box sends, the string form is what a client paired - // with a pre-v0.0.104 one would see. + // with a pre-v0.0.101 one would see. test('parses the object form', () { final history = SelectionHistory.fromJson({ 'last_success_delay_ms': 2556,