Skip to content

Commit e8fae2e

Browse files
committed
account [nfc]: Record TODO on remembering server version at login
1 parent 6b54a3a commit e8fae2e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/account/accountsSelectors.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ export const getServerVersion = (state: PerAccountState): ZulipVersion => {
121121
// At that point probably just have a migration drop those Account
122122
// records -- they mean accounts the user hasn't talked to since
123123
// 1e17f6695, from 2020-05.
124+
//
125+
// Oh, and there's one other case where an Account record will lack this
126+
// data: immediately after login, before we complete the first initial
127+
// fetch. That's fixable, though: we already have the version from
128+
// server_settings when we enter the login flow, so we just need to
129+
// remember that value and stick it in the initial Account record.
124130
invariant(zulipVersion, 'zulipVersion must be non-null');
125131
return zulipVersion;
126132
};

0 commit comments

Comments
 (0)