Skip to content

Commit 145aeea

Browse files
committed
mute model: Remove ancient-server support from the reasons for a fallback
1 parent 7e4c131 commit 145aeea

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/mute/__tests__/muteModel-test.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,6 @@ describe('reducer', () => {
9595
expect(newState).toBeTruthy();
9696
expect(newState && getMute(newState)).toEqual(makeMuteState([[eg.stream, 'topic']]));
9797
});
98-
99-
// TODO(#5102): Delete; see comment on implementation.
100-
test('in ancient no-muted-topics format', () => {
101-
const state = makeMuteState([[eg.stream, 'topic']]);
102-
const action = eg.mkActionRegisterComplete({
103-
muted_topics: undefined,
104-
user_topics: undefined,
105-
});
106-
expect(reducer(state, action, eg.plusReduxState)).toEqual(initialState);
107-
});
10898
});
10999

110100
describe('RESET_ACCOUNT_DATA', () => {

src/mute/muteModel.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,10 @@ export const reducer = (
111111
// TODO(server-6.0): Stop caring about that, when we cut muted_topics.
112112
return convertLegacy(
113113
action.data.muted_topics
114-
// TODO(#5102): Delete fallback once we enforce any threshold for
115-
// ancient servers we refuse to connect to. It was added in
116-
// #2878 (2018-11-16), but it wasn't clear even then, it seems,
117-
// whether any servers actually omit the data. The API doc
118-
// doesn't mention any servers that omit it, and our Flow types
119-
// mark it required.
114+
// Unnecessary fallback just to satisfy Flow: the old
115+
// `muted_topics` is absent only when the new `user_topics` is
116+
// present (ignoring ancient unsupported servers), but Flow
117+
// doesn't track that.
120118
?? [],
121119
getStreamsByName(globalState),
122120
);

0 commit comments

Comments
 (0)