Skip to content

Commit b945442

Browse files
committed
presence: Drop a fallback for ancient servers
Now that #5102 is done, there are definitely no servers we expect to connect to that would send us data missing this property.
1 parent 2f83953 commit b945442

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/presence/presenceModel.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,10 @@ export function reducer(
208208
case RESET_ACCOUNT_DATA:
209209
return initialState;
210210

211-
case REGISTER_COMPLETE: {
212-
// TODO(#5102): Delete fallback once we enforce any threshold for
213-
// ancient servers we refuse to connect to. It was added in
214-
// #2878 (2018-11-16), but it wasn't clear even then, it seems,
215-
// whether any servers actually omit the data. The API doc
216-
// doesn't mention any servers that omit it, and our Flow types
217-
// mark it required.
218-
const data = action.data.presences ?? {};
211+
case REGISTER_COMPLETE:
219212
return {
220-
byEmail: Immutable.Map(data),
213+
byEmail: Immutable.Map(action.data.presences),
221214
};
222-
}
223215

224216
case PRESENCE_RESPONSE:
225217
return {

0 commit comments

Comments
 (0)