Skip to content

Commit

Permalink
presence: Drop a fallback for ancient servers
Browse files Browse the repository at this point in the history
Now that zulip#5102 is done, there are definitely no servers we expect
to connect to that would send us data missing this property.
  • Loading branch information
gnprice committed Mar 29, 2023
1 parent 2f83953 commit b945442
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/presence/presenceModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,10 @@ export function reducer(
case RESET_ACCOUNT_DATA:
return initialState;

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

case PRESENCE_RESPONSE:
return {
Expand Down

0 comments on commit b945442

Please sign in to comment.