Skip to content

Commit fd6abf2

Browse files
authored
Merge branch 'zulip:main' into main
2 parents 2d3ddcf + ad0e065 commit fd6abf2

20 files changed

+725
-4888
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"eslint-plugin-prettier": "^4.0.0",
106106
"eslint-plugin-react": "^7.24.0",
107107
"eslint-plugin-react-hooks": "^4.5.0",
108-
"expo-cli": "^6.0.5",
109108
"flow-bin": "^0.170.0",
110109
"flow-coverage-report": "^0.8.0",
111110
"flow-typed": "^3.3.1",

src/account-info/CustomProfileFields.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function CustomProfileFieldRow(props: {|
6363
let valueElement = undefined;
6464
switch (value.displayType) {
6565
case 'text':
66-
valueElement = <ZulipText style={styles.valueText} text={value.text} />;
66+
valueElement = <ZulipText selectable style={styles.valueText} text={value.text} />;
6767
break;
6868

6969
case 'link':

src/alertWords/__tests__/alertWordsReducer-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe('alertWordsReducer', () => {
2020
expect(actualState).toEqual(expectedState);
2121
});
2222

23+
// TODO(#5102): Delete; see comment on implementation.
2324
test('when no `alert_words` data is given reset state', () => {
2425
const initialState = deepFreeze(['word']);
2526
const action = deepFreeze({

src/alertWords/alertWordsReducer.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ export default (
1515
return initialState;
1616

1717
case REGISTER_COMPLETE:
18-
return action.data.alert_words || initialState;
18+
return (
19+
action.data.alert_words
20+
// TODO(#5102): Delete fallback once we enforce any threshold for
21+
// ancient servers we refuse to connect to. It was added in #2878
22+
// (2018-11-16), but it wasn't clear even then, it seems, whether
23+
// any servers actually omit the data. The API doc doesn't mention
24+
// any servers that omit it, and our Flow types mark it required.
25+
|| initialState
26+
);
1927

2028
case EVENT_ALERT_WORDS:
2129
return action.alert_words || initialState;

src/api/eventTypes.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @flow strict-local
1111
*/
1212

13-
import type { SubsetProperties } from '../generics';
13+
import type { BoundedDiff, SubsetProperties } from '../generics';
1414
import { keyMirror } from '../utils/keyMirror';
1515
import type {
1616
CustomProfileField,
@@ -24,6 +24,7 @@ import type {
2424
UserPresence,
2525
UserStatusUpdate,
2626
UserSettings,
27+
ClientPresence,
2728
} from './modelTypes';
2829
import type { RealmDataForUpdate } from './realmDataTypes';
2930

@@ -135,12 +136,16 @@ export type SubmessageEvent = $ReadOnly<{|
135136
content: string,
136137
|}>;
137138

139+
/** https://zulip.com/api/get-events#presence */
138140
export type PresenceEvent = $ReadOnly<{|
139141
...EventCommon,
140142
type: typeof EventTypes.presence,
141143
email: string,
142144
server_timestamp: number,
143-
presence: UserPresence,
145+
146+
// Clients are asked to compute aggregated presence; the event doesn't
147+
// have it.
148+
presence: BoundedDiff<UserPresence, {| +aggregated: ClientPresence |}>,
144149
|}>;
145150

146151
/**

src/api/initialDataTypes.js

+3
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ export type InitialDataRealmUser = $ReadOnly<{|
415415

416416
export type InitialDataRealmUserGroups = $ReadOnly<{|
417417
// New in Zulip 1.8.
418+
// TODO(#5102): In userGroupsReducer, we still have a fallback for pre-1.8
419+
// servers; remove that, and remove the above comment, which will be
420+
// irrelevant.
418421
realm_user_groups: $ReadOnlyArray<UserGroup>,
419422
|}>;
420423

0 commit comments

Comments
 (0)