author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
129,206
09.11.2022 16:44:09
18,000
626fb77c224ab76400d08606a5818a84190268ec
added glow effect behind modals Summary: glow effect adds contrast between modals and background. Test Plan: Checked different modals in app, all seem to show a glow. Reviewers: ginsu, atul, jon Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/color-selector-modal.react.js", "new_path": "native/chat/settings/color-selector-modal.react.js", "diff": "@@ -151,9 +151,7 @@ const unboundStyles = {\n},\ncolorSelectorContainer: {\nbackgroundColor: 'modalBackground',\n- borderColor: 'modalForegroundBorder',\nborderRadius: 5,\n- borderWidth: 2,\nflex: 0,\nmarginHorizontal: 15,\nmarginVertical: 20,\n" }, { "change_type": "MODIFY", "old_path": "native/components/modal.react.js", "new_path": "native/components/modal.react.js", "diff": "@@ -48,6 +48,8 @@ const unboundStyles = {\n},\nmodal: {\nbackgroundColor: 'modalBackground',\n+ borderColor: 'modalForegroundBorder',\n+ borderWidth: 2,\nborderRadius: 5,\nflex: 1,\njustifyContent: 'center',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
added glow effect behind modals Summary: glow effect adds contrast between modals and background. Test Plan: Checked different modals in app, all seem to show a glow. Reviewers: ginsu, atul, jon Reviewed By: atul Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5588
129,184
10.11.2022 12:33:04
18,000
d8ff5dff60401ecd0a272a06011d2a80b936480c
[native] Pull `useIsCurrentUserStaff()` out of `useStaffCanSee()` Summary: Pull `useIsCurrentUserStaff()` out from `useStaffCanSee()` and consume in `BuildInfo` and `StaffContextProvider`. Test Plan: `BuildInfo` + `StaffContextProvider` continue to look/work as expected. Reviewers: tomek, marcin, varun, ginsu, rohan, O2 Blocking Reviewers Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/profile/build-info.react.js", "new_path": "native/profile/build-info.react.js", "diff": "import * as React from 'react';\nimport { View, Text, ScrollView } from 'react-native';\n-import { useSelector } from 'react-redux';\n-\n-import { isStaff } from 'lib/shared/user-utils';\nimport { persistConfig, codeVersion } from '../redux/persist';\nimport { StaffContext } from '../staff/staff-context';\nimport { useStyles } from '../themes/colors';\n-import { isStaffRelease, useStaffCanSee } from '../utils/staff-utils';\n+import {\n+ isStaffRelease,\n+ useIsCurrentUserStaff,\n+ useStaffCanSee,\n+} from '../utils/staff-utils';\n// eslint-disable-next-line no-unused-vars\nfunction BuildInfo(props: { ... }): React.Node {\n- const isCurrentUserStaff = useSelector(\n- state =>\n- state.currentUserInfo &&\n- state.currentUserInfo.id &&\n- isStaff(state.currentUserInfo.id),\n- );\n+ const isCurrentUserStaff = useIsCurrentUserStaff();\nconst { staffUserHasBeenLoggedIn } = React.useContext(StaffContext);\nconst styles = useStyles(unboundStyles);\nconst staffCanSee = useStaffCanSee();\n" }, { "change_type": "MODIFY", "old_path": "native/staff/staff-context.provider.react.js", "new_path": "native/staff/staff-context.provider.react.js", "diff": "// @flow\nimport * as React from 'react';\n-import { useSelector } from 'react-redux';\n-\n-import { isStaff } from 'lib/shared/user-utils';\n+import { useIsCurrentUserStaff } from '../utils/staff-utils';\nimport { StaffContext, type StaffContextType } from './staff-context';\ntype Props = {\n@@ -16,12 +14,7 @@ function StaffContextProvider(props: Props): React.Node {\nsetStaffUserHasBeenLoggedIn,\n] = React.useState(false);\n- const isCurrentUserStaff = useSelector(\n- state =>\n- state.currentUserInfo &&\n- state.currentUserInfo.id &&\n- isStaff(state.currentUserInfo.id),\n- );\n+ const isCurrentUserStaff = useIsCurrentUserStaff();\nReact.useEffect(() => {\nif (isCurrentUserStaff) {\n" }, { "change_type": "MODIFY", "old_path": "native/utils/staff-utils.js", "new_path": "native/utils/staff-utils.js", "diff": "@@ -6,14 +6,19 @@ import { isStaff } from 'lib/shared/user-utils';\nconst isStaffRelease = false;\n-function useStaffCanSee(): boolean {\n+function useIsCurrentUserStaff(): boolean {\nconst isCurrentUserStaff = useSelector(\nstate =>\nstate.currentUserInfo &&\nstate.currentUserInfo.id &&\nisStaff(state.currentUserInfo.id),\n);\n+ return isCurrentUserStaff;\n+}\n+\n+function useStaffCanSee(): boolean {\n+ const isCurrentUserStaff = useIsCurrentUserStaff();\nreturn __DEV__ || isStaffRelease || isCurrentUserStaff;\n}\n-export { isStaffRelease, useStaffCanSee };\n+export { isStaffRelease, useIsCurrentUserStaff, useStaffCanSee };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Pull `useIsCurrentUserStaff()` out of `useStaffCanSee()` Summary: Pull `useIsCurrentUserStaff()` out from `useStaffCanSee()` and consume in `BuildInfo` and `StaffContextProvider`. Test Plan: `BuildInfo` + `StaffContextProvider` continue to look/work as expected. Reviewers: tomek, marcin, varun, ginsu, rohan, O2 Blocking Reviewers Reviewed By: tomek, O2 Blocking Reviewers Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5587
129,184
10.11.2022 21:03:31
18,000
aabfb68826c2f7b900c96ed54f87712b2bacfc76
[native] Update `listChatBubble` for light mode Summary: Context: Test Plan: Before: {F232490} After: {F232491} Things look as expected. Reviewers: tomek, marcin, ginsu, rohan, abosh, varun, O2 Blocking Reviewers, ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/themes/colors.js", "new_path": "native/themes/colors.js", "diff": "@@ -29,7 +29,7 @@ const light = Object.freeze({\nlistBackgroundLabel: 'black',\nlistBackgroundSecondaryLabel: '#444444',\nlistBackgroundTernaryLabel: '#999999',\n- listChatBubble: '#DDDDDDBB',\n+ listChatBubble: '#F1F0F5',\nlistForegroundLabel: 'black',\nlistForegroundQuaternaryLabel: '#AAAAAA',\nlistForegroundSecondaryLabel: '#333333',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update `listChatBubble` for light mode Summary: Context: https://linear.app/comm/issue/ENG-2052/re-introduce-light-mode-in-native Test Plan: Before: {F232490} After: {F232491} Things look as expected. Reviewers: tomek, marcin, ginsu, rohan, abosh, varun, O2 Blocking Reviewers, ashoat Reviewed By: ginsu, rohan, O2 Blocking Reviewers, ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5614
129,184
10.11.2022 22:16:57
18,000
eaa421707f81123e05571c624c830d8b97b5434e
[native] Fix appearance of `Calendar` in light mode Summary: Context: Test Plan: Before: {F232574} After: {F232573} Things looks as expected (on dark mode as well). Reviewers: tomek, marcin, ginsu, rohan, abosh, varun, O2 Blocking Reviewers, ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -1031,7 +1031,7 @@ const unboundStyles = {\nbottom: 0,\n},\nsectionHeader: {\n- backgroundColor: 'panelForeground',\n+ backgroundColor: 'panelSecondaryForeground',\nborderBottomWidth: 2,\nborderColor: 'listBackground',\nheight: 31,\n" }, { "change_type": "MODIFY", "old_path": "native/calendar/section-footer.react.js", "new_path": "native/calendar/section-footer.react.js", "diff": "@@ -47,7 +47,7 @@ const unboundStyles = {\nfontWeight: 'bold',\n},\naddButton: {\n- backgroundColor: 'panelForeground',\n+ backgroundColor: 'panelSecondaryForeground',\nborderRadius: 5,\nmargin: 5,\npaddingBottom: 5,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix appearance of `Calendar` in light mode Summary: Context: https://linear.app/comm/issue/ENG-2052/re-introduce-light-mode-in-native Test Plan: Before: {F232574} After: {F232573} Things looks as expected (on dark mode as well). Reviewers: tomek, marcin, ginsu, rohan, abosh, varun, O2 Blocking Reviewers, ashoat Reviewed By: ginsu, O2 Blocking Reviewers, ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5616
129,187
13.11.2022 13:07:10
18,000
192b1b7cf7ac6338e9e47ecf765db4a50e8f4b33
[docs] Copy JDK docs into Nix Summary: This is the copy-paste part of D5544, separating based on ["Moving code around" doc](https://www.notion.so/commapp/Moving-code-around-bbb551c4350b4d5cb553c6751be44314) Test Plan: N/A Reviewers: jon!, varun, atul Subscribers: tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "docs/nix_dev_env.md", "new_path": "docs/nix_dev_env.md", "diff": "@@ -50,6 +50,7 @@ On macOS, [installing Xcode](./nix_mobile_setup.md#xcode) is a prerequisite for\n- [Xcode](./nix_mobile_setup.md#xcode)\n- [Xcode settings](./nix_mobile_setup.md#xcode-settings)\n- [Android development]((./nix_mobile_setup.md#android-development)\n+ - [JDK (Java Development Kit)](./nix_mobile_setup.md#jdk)\n- [Android Studio](./nix_mobile_setup.md#android-studio)\n- [Android SDK](./nix_mobile_setup.md#android-sdk)\n- [Android emulator](./nix_mobile_setup.md#android-emulator)\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[docs] Copy JDK docs into Nix Summary: This is the copy-paste part of D5544, separating based on ["Moving code around" doc](https://www.notion.so/commapp/Moving-code-around-bbb551c4350b4d5cb553c6751be44314) Test Plan: N/A Reviewers: jon!, varun, atul Subscribers: tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5624
129,187
13.11.2022 15:13:27
18,000
27d586bba3870d0f318145676b302f4c527e51b2
Fix typo in D5625
[ { "change_type": "MODIFY", "old_path": "docs/nix_dev_env.md", "new_path": "docs/nix_dev_env.md", "diff": "@@ -49,7 +49,7 @@ On macOS, [installing Xcode](./nix_mobile_setup.md#xcode) is a prerequisite for\n- [iOS development](./nix_mobile_setup.md#ios-development)\n- [Xcode](./nix_mobile_setup.md#xcode)\n- [Xcode settings](./nix_mobile_setup.md#xcode-settings)\n- - [Android development]((./nix_mobile_setup.md#android-development)\n+ - [Android development](./nix_mobile_setup.md#android-development)\n- [JDK (Java Development Kit)](./nix_mobile_setup.md#jdk)\n- [Android Studio](./nix_mobile_setup.md#android-studio)\n- [Android SDK](./nix_mobile_setup.md#android-sdk)\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Fix typo in D5625
129,184
11.11.2022 17:18:24
18,000
38f16638f790f829f01bc1dc894f902d89b01438
[native] Fix appearance of `ColorSelectorModal` in light mode Summary: Context: Test Plan: Before: {F233540} After: {F233541} Things look as expected (on dark mode as well). Reviewers: tomek, marcin, ginsu, rohan, ashoat Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/components/color-selector-button.react.js", "new_path": "native/components/color-selector-button.react.js", "diff": "// @flow\nimport * as React from 'react';\n-import { StyleSheet, TouchableOpacity, View } from 'react-native';\n+import { TouchableOpacity, View } from 'react-native';\nimport tinycolor from 'tinycolor2';\nimport type { SetState } from 'lib/types/hook-types';\n+import { useStyles } from '../themes/colors';\n+\ntype ColorSelectorButtonProps = {\n+color: string,\n+pendingColor: string,\n@@ -13,10 +15,11 @@ type ColorSelectorButtonProps = {\n};\nfunction ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {\nconst { color, pendingColor, setPendingColor } = props;\n+ const styles = useStyles(unboundStyles);\nconst colorSplotchStyle = React.useMemo(() => {\nreturn [styles.button, { backgroundColor: `#${color}` }];\n- }, [color]);\n+ }, [color, styles.button]);\nconst onPendingColorSelected = React.useCallback(() => {\nsetPendingColor(color);\n@@ -33,7 +36,7 @@ function ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {\n);\n}\n-const styles = StyleSheet.create({\n+const unboundStyles = {\nbutton: {\nborderRadius: 20,\nheight: 40,\n@@ -47,12 +50,12 @@ const styles = StyleSheet.create({\nwidth: 60,\n},\nouterRingSelected: {\n- backgroundColor: '#404040',\n+ backgroundColor: 'modalForegroundBorder',\nborderRadius: 30,\nheight: 60,\nmargin: 5,\nwidth: 60,\n},\n-});\n+};\nexport default ColorSelectorButton;\n" }, { "change_type": "MODIFY", "old_path": "native/components/color-selector.react.js", "new_path": "native/components/color-selector.react.js", "diff": "@@ -82,7 +82,7 @@ const styles = StyleSheet.create({\nflex: 1,\n},\nheader: {\n- color: 'white',\n+ color: 'modalForegroundLabel',\nfontSize: 24,\nfontWeight: 'bold',\nmarginBottom: 10,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix appearance of `ColorSelectorModal` in light mode Summary: Context: https://linear.app/comm/issue/ENG-2052/re-introduce-light-mode-in-native Test Plan: Before: {F233540} After: {F233541} Things look as expected (on dark mode as well). Reviewers: tomek, marcin, ginsu, rohan, ashoat Reviewed By: ashoat Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5619
129,184
11.11.2022 17:35:25
18,000
fa236b17b5f701c2f4f388eed6d5032ec8eb7ae7
[native] Fix appearance of `Tooltip` in light mode Summary: Context: Test Plan: Before: {F233569} After: {F233570} Things look as expected (on dark mode as well). Reviewers: tomek, marcin, rohan, ashoat Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/navigation/tooltip.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -10,7 +10,6 @@ import invariant from 'invariant';\nimport * as React from 'react';\nimport {\nView,\n- StyleSheet,\nTouchableWithoutFeedback,\nPlatform,\nTouchableOpacity,\n@@ -40,6 +39,7 @@ import SWMansionIcon from '../components/swmansion-icon.react';\nimport { type InputState, InputStateContext } from '../input/input-state';\nimport { type DimensionsInfo } from '../redux/dimensions-updater.react';\nimport { useSelector } from '../redux/redux-utils';\n+import { useStyles } from '../themes/colors';\nimport {\ntype VerticalBounds,\ntype LayoutCoordinates,\n@@ -72,6 +72,7 @@ type TooltipItemProps<RouteName> = {\n+onPress: (entry: TooltipEntry<RouteName>) => void,\n+containerStyle?: ViewStyle,\n+labelStyle?: TextStyle,\n+ +styles: typeof unboundStyles,\n};\ntype TooltipSpec<RouteName> = {\n+entries: $ReadOnlyArray<TooltipEntry<RouteName>>,\n@@ -119,6 +120,7 @@ type TooltipProps<Base> = {\n+showActionSheetWithOptions: ShowActionSheetWithOptions,\n+actionSheetShown: boolean,\n+setActionSheetShown: (actionSheetShown: boolean) => void,\n+ +styles: typeof unboundStyles,\n};\nfunction createTooltip<\n@@ -131,6 +133,7 @@ function createTooltip<\nclass TooltipItem extends React.PureComponent<TooltipItemProps<RouteName>> {\nrender() {\nlet icon;\n+ const { styles } = this.props;\nif (this.props.spec.id === 'copy') {\nicon = <SWMansionIcon name=\"copy\" style={styles.icon} size={16} />;\n} else if (this.props.spec.id === 'reply') {\n@@ -273,7 +276,7 @@ function createTooltip<\nget opacityStyle() {\nreturn {\n- ...styles.backdrop,\n+ ...this.props.styles.backdrop,\nopacity: this.backdropOpacity,\n};\n}\n@@ -285,7 +288,7 @@ function createTooltip<\nconst bottom =\nfullScreenHeight - verticalBounds.y - verticalBounds.height;\nreturn {\n- ...styles.contentContainer,\n+ ...this.props.styles.contentContainer,\nmarginTop: top,\nmarginBottom: bottom,\n};\n@@ -379,6 +382,7 @@ function createTooltip<\nshowActionSheetWithOptions,\nactionSheetShown,\nsetActionSheetShown,\n+ styles,\n...navAndRouteForFlow\n} = this.props;\n@@ -403,6 +407,7 @@ function createTooltip<\nonPress={this.onPressEntry}\ncontainerStyle={[...tooltipContainerStyle, style]}\nlabelStyle={tooltipSpec.labelStyle}\n+ styles={styles}\n/>\n);\n});\n@@ -422,6 +427,7 @@ function createTooltip<\nspec={moreSpec}\nonPress={moreSpec.onPress}\ncontainerStyle={tooltipContainerStyle}\n+ styles={styles}\n/>\n);\n@@ -539,6 +545,7 @@ function createTooltip<\npaddingBottom: 24,\n};\n+ const { styles } = this.props;\nconst icons = [\n<SWMansionIcon\nkey=\"report\"\n@@ -655,6 +662,8 @@ function createTooltip<\nfalse,\n);\n+ const styles = useStyles(unboundStyles);\n+\nreturn (\n<Tooltip\n{...props}\n@@ -669,12 +678,13 @@ function createTooltip<\nshowActionSheetWithOptions={showActionSheetWithOptions}\nactionSheetShown={actionSheetShown}\nsetActionSheetShown={setActionSheetShown}\n+ styles={styles}\n/>\n);\n});\n}\n-const styles = StyleSheet.create({\n+const unboundStyles = {\nbackdrop: {\nbackgroundColor: 'black',\nbottom: 0,\n@@ -694,7 +704,7 @@ const styles = StyleSheet.create({\noverflow: 'hidden',\n},\nicon: {\n- color: '#FFFFFF',\n+ color: 'modalForegroundLabel',\n},\nitemContainer: {\nalignItems: 'center',\n@@ -711,11 +721,11 @@ const styles = StyleSheet.create({\nborderBottomWidth: 1,\n},\nitemMarginFixed: {\n- borderRightColor: '#404040',\n+ borderRightColor: 'panelForegroundBorder',\nborderRightWidth: 1,\n},\nitems: {\n- backgroundColor: '#1F1F1F',\n+ backgroundColor: 'panelBackground',\nborderRadius: 5,\noverflow: 'hidden',\n},\n@@ -724,7 +734,7 @@ const styles = StyleSheet.create({\nflexDirection: 'row',\n},\nlabel: {\n- color: '#FFFFFF',\n+ color: 'modalForegroundLabel',\nfontSize: 14,\nlineHeight: 17,\ntextAlign: 'center',\n@@ -757,7 +767,7 @@ const styles = StyleSheet.create({\nheight: 10,\nwidth: 10,\n},\n-});\n+};\nfunction tooltipHeight(numEntries: number): number {\n// 10 (triangle) + 37 * numEntries (entries) + numEntries - 1 (padding)\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix appearance of `Tooltip` in light mode Summary: Context: https://linear.app/comm/issue/ENG-2052/re-introduce-light-mode-in-native Test Plan: Before: {F233569} After: {F233570} Things look as expected (on dark mode as well). Reviewers: tomek, marcin, rohan, ashoat Reviewed By: ashoat Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5620
129,188
07.11.2022 17:59:23
-3,600
24dec60ecf51d9cb4bd34974c0da263f24fbe9ca
[native] fix `getDeviceID` return type Summary: context: [eng-2184](https://linear.app/comm/issue/ENG-2184/fix-setdeviceid-operation) Fix the typo in type definition. Test Plan: 1. Build app 2. Check if `deviceID` value is properly returned Reviewers: marcin, inka, tomek Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "native/schema/CommCoreModuleSchema.js", "new_path": "native/schema/CommCoreModuleSchema.js", "diff": "@@ -51,7 +51,7 @@ export interface Spec extends TurboModule {\n+setCurrentUserID: (userID: string) => Promise<void>;\n+getCurrentUserID: () => Promise<string>;\n+setDeviceID: (deviceType: string) => Promise<string>;\n- +getDeviceID: () => Promise<String>;\n+ +getDeviceID: () => Promise<string>;\n+clearSensitiveData: () => Promise<void>;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] fix `getDeviceID` return type Summary: context: [eng-2184](https://linear.app/comm/issue/ENG-2184/fix-setdeviceid-operation) Fix the typo in type definition. Test Plan: 1. Build app 2. Check if `deviceID` value is properly returned Reviewers: marcin, inka, tomek Reviewed By: marcin, inka, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5575
129,184
16.11.2022 09:54:12
18,000
69293f1edd61ed0c8213176f4a06545a721b8735
[lib] Fix typo `assetMediaMessageType` => `assertMediaMessageType` Summary: Super minor fix. Test Plan: This function isn't used anywhere in the codebase. I'm about to use it though. Reviewers: tomek, ginsu, rohan, marcin, kamil, O2 Blocking Reviewers Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -199,7 +199,7 @@ const mediaMessageTypes = new Set([\nexport function isMediaMessageType(ourMessageType: MessageType): boolean {\nreturn mediaMessageTypes.has(ourMessageType);\n}\n-export function assetMediaMessageType(\n+export function assertMediaMessageType(\nourMessageType: MessageType,\n): MessageType {\ninvariant(isMediaMessageType(ourMessageType), 'MessageType is not media');\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Fix typo `assetMediaMessageType` => `assertMediaMessageType` Summary: Super minor fix. Test Plan: This function isn't used anywhere in the codebase. I'm about to use it though. Reviewers: tomek, ginsu, rohan, marcin, kamil, O2 Blocking Reviewers Reviewed By: tomek, rohan, O2 Blocking Reviewers Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5635
129,178
16.11.2022 12:36:34
18,000
d9d0fc787f6dd6b21741e531c6958a14f02f16db
[landing] added Steven to team page Summary: added Steven Test Plan: Please see screenshots of changes I made Before: {F247736} After: {F247737} Reviewers: atul, rohan Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "landing/team.react.js", "new_path": "landing/team.react.js", "diff": "@@ -92,6 +92,11 @@ function Team(): React.Node {\ntwitterHandle=\"ginsueddy\"\nimageURL={`${assetsCacheURLPrefix}/ginsu.jpg`}\n/>\n+ <TeamProfile\n+ name=\"Steven Cherucheril\"\n+ role=\"Chief of Staff\"\n+ imageURL={`${assetsCacheURLPrefix}/steven.jpg`}\n+ />\n</div>\n</section>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] added Steven to team page Summary: added Steven Test Plan: Please see screenshots of changes I made Before: {F247736} After: {F247737} Reviewers: atul, rohan Reviewed By: atul, rohan Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5653
129,187
16.11.2022 23:17:47
18,000
03e8e711df58ac3eb0c678b16c2c13f17765190b
[lib] Clear MessageStore on freshMessageStore Summary: We don't seem to use `remove_all` on the messages side, but we do on the threads side. Was this an oversight? Test Plan: Haven't tested yet, mostly just asking posing this as a question Reviewers: atul Subscribers: tomek, abosh
[ { "change_type": "MODIFY", "old_path": "lib/reducers/message-reducer.js", "new_path": "lib/reducers/message-reducer.js", "diff": "@@ -140,10 +140,16 @@ function freshMessageStore(\nconst orderedMessageInfos = sortMessageInfoList(unshimmed);\nconst messages = _keyBy(messageID)(orderedMessageInfos);\n- const messageStoreOperations = orderedMessageInfos.map(messageInfo => ({\n+ const messageStoreReplaceOperations = orderedMessageInfos.map(\n+ messageInfo => ({\ntype: 'replace',\npayload: { id: messageID(messageInfo), messageInfo },\n- }));\n+ }),\n+ );\n+ const messageStoreOperations = [\n+ { type: 'remove_all' },\n+ ...messageStoreReplaceOperations,\n+ ];\nconst threadsToMessageIDs = mapThreadsToMessageIDsFromOrderedMessageInfos(\norderedMessageInfos,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Clear MessageStore on freshMessageStore Summary: We don't seem to use `remove_all` on the messages side, but we do on the threads side. Was this an oversight? Test Plan: Haven't tested yet, mostly just asking posing this as a question Reviewers: atul Reviewed By: atul Subscribers: tomek, abosh Differential Revision: https://phab.comm.dev/D5659
129,184
18.11.2022 15:59:58
18,000
0cb917cd53d10eee1b56af7dfcd76b97398c4d51
[native] `codeVersion` -> 154
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 153\n- versionName '1.0.153'\n+ versionCode 154\n+ versionName '1.0.154'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{153};\n+ const int codeVersion{154};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 153;\n+ CURRENT_PROJECT_VERSION = 154;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.153;\n+ MARKETING_VERSION = 1.0.154;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 153;\n+ CURRENT_PROJECT_VERSION = 154;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.153;\n+ MARKETING_VERSION = 1.0.154;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.153</string>\n+ <string>1.0.154</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>153</string>\n+ <string>154</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.153</string>\n+ <string>1.0.154</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>153</string>\n+ <string>154</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 154
129,178
18.11.2022 18:20:34
18,000
1132715d25311186b8ee340937632d73eb143ec2
[lib] introduced ReactionMessageInfo Summary: introduced `ReactionMessageInfo` to message types. This type will be needed in our Reaction Message Spec Linear Task: [[ | ]] Test Plan: `Flow` and this will be further tested in subsequent diffs Reviewers: atul, rohan Subscribers: ashoat, tomek, atul
[ { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -335,6 +335,16 @@ export type SidebarSourceMessageInfo = {\n+sourceMessage: ComposableMessageInfo | RobotextMessageInfo,\n};\n+export type ReactionMessageInfo = {\n+ +type: 19,\n+ +id: string,\n+ +threadID: string,\n+ +creator: RelativeUserInfo,\n+ +time: number,\n+ +targetMessageID: string,\n+ +reaction: string | null,\n+};\n+\nexport type MessageInfo =\n| ComposableMessageInfo\n| RobotextMessageInfo\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] introduced ReactionMessageInfo Summary: introduced `ReactionMessageInfo` to message types. This type will be needed in our Reaction Message Spec --- Linear Task: [[ https://linear.app/comm/issue/ENG-2243/message-likes | ENG-2243 ]] Test Plan: `Flow` and this will be further tested in subsequent diffs Reviewers: atul, rohan Reviewed By: atul Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D5683
129,187
18.11.2022 09:12:53
18,000
10dae0d8774fca12bc561d78f2daabb7473e27f3
[lib] Introduce newThread helper to message-reducer.js Summary: This should be a no-op. The only change is that we will have slightly different pruning times, but that should not be significant. Test Plan: Flow, and also the other testing I've done for the stack Reviewers: atul, tomek
[ { "change_type": "MODIFY", "old_path": "lib/reducers/message-reducer.js", "new_path": "lib/reducers/message-reducer.js", "diff": "@@ -126,6 +126,13 @@ function isThreadWatched(\n);\n}\n+const newThread = () => ({\n+ messageIDs: [],\n+ startReached: false,\n+ lastNavigatedTo: 0,\n+ lastPruned: Date.now(),\n+});\n+\ntype FreshMessageStoreResult = {\n+messageStoreOperations: $ReadOnlyArray<MessageStoreOperation>,\n+messageStore: MessageStore,\n@@ -154,14 +161,12 @@ function freshMessageStore(\nconst threadsToMessageIDs = mapThreadsToMessageIDsFromOrderedMessageInfos(\norderedMessageInfos,\n);\n- const lastPruned = Date.now();\nconst threads = _mapValuesWithKeys(\n(messageIDs: string[], threadID: string) => ({\n+ ...newThread(),\nmessageIDs,\nstartReached:\ntruncationStatus[threadID] === messageTruncationStatus.EXHAUSTIVE,\n- lastNavigatedTo: 0,\n- lastPruned,\n}),\n)(threadsToMessageIDs);\nconst watchedIDs = threadWatcher.getWatchedIDs();\n@@ -173,12 +178,7 @@ function freshMessageStore(\n) {\ncontinue;\n}\n- threads[threadID] = {\n- messageIDs: [],\n- startReached: false,\n- lastNavigatedTo: 0,\n- lastPruned,\n- };\n+ threads[threadID] = newThread();\n}\nreturn {\nmessageStoreOperations,\n@@ -418,7 +418,6 @@ function mergeNewMessages(\n);\nconst oldMessageInfosToCombine = [];\nconst threadsThatNeedMessageIDsResorted = [];\n- const lastPruned = Date.now();\nconst local = {};\nconst threads = _flow(\n_mapValuesWithKeys((messageIDs: string[], threadID: string) => {\n@@ -426,10 +425,9 @@ function mergeNewMessages(\nconst truncate = truncationStatus[threadID];\nif (!oldThread) {\nreturn {\n+ ...newThread(),\nmessageIDs,\nstartReached: truncate === messageTruncationStatus.EXHAUSTIVE,\n- lastNavigatedTo: 0,\n- lastPruned,\n};\n}\nlet oldMessageIDsUnchanged = true;\n@@ -611,12 +609,7 @@ function updateMessageStoreWithLatestThreadInfos(\nisThreadWatched(threadID, threadInfo, watchedIDs) &&\n!filteredThreads[threadID]\n) {\n- filteredThreads[threadID] = {\n- messageIDs: [],\n- startReached: false,\n- lastNavigatedTo: 0,\n- lastPruned: Date.now(),\n- };\n+ filteredThreads[threadID] = newThread();\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Introduce newThread helper to message-reducer.js Summary: This should be a no-op. The only change is that we will have slightly different pruning times, but that should not be significant. Test Plan: Flow, and also the other testing I've done for the stack Reviewers: atul, tomek Reviewed By: atul Differential Revision: https://phab.comm.dev/D5670
129,184
22.11.2022 18:30:23
18,000
00d1519a8405631f2fa2ec370c62cc80d6325a75
[native] `codeVersion` -> 155
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 154\n- versionName '1.0.154'\n+ versionCode 155\n+ versionName '1.0.155'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -14,7 +14,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{154};\n+ const int codeVersion{155};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 154;\n+ CURRENT_PROJECT_VERSION = 155;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.154;\n+ MARKETING_VERSION = 1.0.155;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 154;\n+ CURRENT_PROJECT_VERSION = 155;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.154;\n+ MARKETING_VERSION = 1.0.155;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.154</string>\n+ <string>1.0.155</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>154</string>\n+ <string>155</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.154</string>\n+ <string>1.0.155</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>154</string>\n+ <string>155</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 155
129,196
16.11.2022 13:28:36
-3,600
22edb962ced2ab759e5357e89d03f5d07f8c7cb9
Bring drafts and related actions to redux Summary: This differential creates a place for drafts in redux, and makes actions to handle them visible for reducers. Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, ashoat Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/website-responders.js", "new_path": "keyserver/src/responders/website-responders.js", "diff": "@@ -310,6 +310,7 @@ async function websiteResponder(\nnavInfo: navInfoPromise,\ndeviceID: null,\ncurrentUserInfo: ((currentUserInfoPromise: any): Promise<CurrentUserInfo>),\n+ draftStore: { drafts: {} },\nsessionID: sessionIDPromise,\nentryStore: entryStorePromise,\nthreadStore: threadStorePromise,\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -13,6 +13,7 @@ import type {\nQueueActivityUpdatesPayload,\nSetThreadUnreadStatusPayload,\n} from './activity-types';\n+import type { DraftStore } from './draft-types';\nimport type { EnabledApps, SupportedApps } from './enabled-apps';\nimport type {\nRawEntryInfo,\n@@ -80,6 +81,7 @@ import type { CurrentUserInfo, UserStore } from './user-types';\nexport type BaseAppState<NavInfo: BaseNavInfo> = {\nnavInfo: NavInfo,\ncurrentUserInfo: ?CurrentUserInfo,\n+ draftStore: DraftStore,\nentryStore: EntryStore,\nthreadStore: ThreadStore,\nuserStore: UserStore,\n@@ -537,12 +539,23 @@ export type BaseAction =\n+loadingInfo: LoadingInfo,\n}\n| {\n- +type: 'SAVE_DRAFT',\n+ +type: 'UPDATE_DRAFT',\n+payload: {\n+key: string,\n- +draft: string,\n+ +text: string,\n},\n}\n+ | {\n+ +type: 'MOVE_DRAFT',\n+ +payload: {\n+ +oldKey: string,\n+ +newKey: string,\n+ },\n+ }\n+ | {\n+ +type: 'SET_DRAFT_STORE_DRAFTS',\n+ +payload: $ReadOnlyArray<{ +key: string, +text: string }>,\n+ }\n| {\n+type: 'UPDATE_ACTIVITY_STARTED',\n+payload?: void,\n" }, { "change_type": "MODIFY", "old_path": "native/redux/redux-setup.js", "new_path": "native/redux/redux-setup.js", "diff": "@@ -78,6 +78,7 @@ import type { AppState } from './state-types';\nconst defaultState = ({\nnavInfo: defaultNavInfo,\ncurrentUserInfo: null,\n+ draftStore: { drafts: {} },\nentryStore: {\nentryInfos: {},\ndaysToEntries: {},\n" }, { "change_type": "MODIFY", "old_path": "native/redux/state-types.js", "new_path": "native/redux/state-types.js", "diff": "import type { Orientations } from 'react-native-orientation-locker';\nimport type { PersistState } from 'redux-persist/src/types';\n+import type { DraftStore } from 'lib/types/draft-types';\nimport type { EnabledApps } from 'lib/types/enabled-apps';\nimport type { EntryStore } from 'lib/types/entry-types';\nimport type { CalendarFilter } from 'lib/types/filter-types';\n@@ -24,6 +25,7 @@ import type { DimensionsInfo } from './dimensions-updater.react';\nexport type AppState = {\nnavInfo: NavInfo,\ncurrentUserInfo: ?CurrentUserInfo,\n+ draftStore: DraftStore,\nentryStore: EntryStore,\nthreadStore: ThreadStore,\nuserStore: UserStore,\n" }, { "change_type": "MODIFY", "old_path": "web/redux/redux-setup.js", "new_path": "web/redux/redux-setup.js", "diff": "@@ -12,6 +12,7 @@ import { mostRecentlyReadThreadSelector } from 'lib/selectors/thread-selectors';\nimport { isLoggedIn } from 'lib/selectors/user-selectors';\nimport { invalidSessionDowngrade } from 'lib/shared/account-utils';\nimport type { Shape } from 'lib/types/core';\n+import type { DraftStore } from 'lib/types/draft-types';\nimport type { EnabledApps } from 'lib/types/enabled-apps';\nimport type { EntryStore } from 'lib/types/entry-types';\nimport type { CalendarFilter } from 'lib/types/filter-types';\n@@ -42,6 +43,7 @@ export type AppState = {\nnavInfo: NavInfo,\ndeviceID: ?string,\ncurrentUserInfo: ?CurrentUserInfo,\n+ draftStore: DraftStore,\nsessionID: ?string,\nentryStore: EntryStore,\nthreadStore: ThreadStore,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Bring drafts and related actions to redux Summary: This differential creates a place for drafts in redux, and makes actions to handle them visible for reducers. Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, ashoat Reviewed By: tomek, atul Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5644
129,196
16.11.2022 14:03:09
-3,600
03c2c2e930cde7b020f86625468bfc2954aaf31d
Implement draft reducer and use it in master reducer Summary: This differential implements draft reducer and uses it in master reducer Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, ashoat Subscribers: ashoat, abosh
[ { "change_type": "ADD", "old_path": null, "new_path": "lib/reducers/draft-reducer.js", "diff": "+// @flow\n+\n+import {\n+ moveDraftActionType,\n+ setDraftStoreDrafts,\n+ updateDraftActionType,\n+} from '../actions/draft-actions';\n+import {\n+ deleteAccountActionTypes,\n+ logOutActionTypes,\n+} from '../actions/user-actions';\n+import type { DraftStore, DraftStoreOperation } from '../types/draft-types';\n+import type { BaseAction } from '../types/redux-types';\n+import { setNewSessionActionType } from '../utils/action-utils';\n+\n+type ReduceDraftStoreResult = {\n+ +draftStoreOperations: $ReadOnlyArray<DraftStoreOperation>,\n+ +draftStore: DraftStore,\n+};\n+\n+function reduceDraftStore(\n+ draftStore: DraftStore,\n+ action: BaseAction,\n+): ReduceDraftStoreResult {\n+ if (\n+ action.type === logOutActionTypes.success ||\n+ action.type === deleteAccountActionTypes.success ||\n+ (action.type === setNewSessionActionType &&\n+ action.payload.sessionChange.cookieInvalidated)\n+ ) {\n+ return {\n+ draftStoreOperations: [{ type: 'remove_all' }],\n+ draftStore: { drafts: {} },\n+ };\n+ } else if (action.type === updateDraftActionType) {\n+ const { key, text } = action.payload;\n+\n+ const draftStoreOperations = [\n+ {\n+ type: 'update',\n+ payload: { key, text },\n+ },\n+ ];\n+ return {\n+ draftStoreOperations,\n+ draftStore: {\n+ ...draftStore,\n+ drafts: {\n+ ...draftStore.drafts,\n+ [key]: text,\n+ },\n+ },\n+ };\n+ } else if (action.type === moveDraftActionType) {\n+ const { oldKey, newKey } = action.payload;\n+\n+ const draftStoreOperations = [\n+ {\n+ type: 'move',\n+ payload: { oldKey, newKey },\n+ },\n+ ];\n+\n+ const { [oldKey]: text, ...draftsWithoutOldKey } = draftStore.drafts;\n+ return {\n+ draftStoreOperations,\n+ draftStore: {\n+ ...draftStore,\n+ drafts: {\n+ ...draftsWithoutOldKey,\n+ [newKey]: text,\n+ },\n+ },\n+ };\n+ } else if (action.type === setDraftStoreDrafts) {\n+ const drafts = {};\n+ for (const dbDraftInfo of action.payload) {\n+ drafts[dbDraftInfo.key] = dbDraftInfo.text;\n+ }\n+ return {\n+ draftStoreOperations: [],\n+ draftStore: {\n+ ...draftStore,\n+ drafts: drafts,\n+ },\n+ };\n+ }\n+ return { draftStore, draftStoreOperations: [] };\n+}\n+\n+export { reduceDraftStore };\n" }, { "change_type": "MODIFY", "old_path": "lib/reducers/master-reducer.js", "new_path": "lib/reducers/master-reducer.js", "diff": "@@ -11,6 +11,7 @@ import type { StoreOperations } from '../types/store-ops-types';\nimport reduceCalendarFilters from './calendar-filters-reducer';\nimport reduceConnectionInfo from './connection-reducer';\nimport reduceDataLoaded from './data-loaded-reducer';\n+import { reduceDraftStore } from './draft-reducer';\nimport reduceEnabledApps from './enabled-apps-reducer';\nimport { reduceEntryInfos } from './entry-reducer';\nimport reduceLifecycleState from './lifecycle-state-reducer';\n@@ -75,10 +76,16 @@ export default function baseReducer<N: BaseNavInfo, T: BaseAppState<N>>(\n}\n}\n+ const { draftStore, draftStoreOperations } = reduceDraftStore(\n+ state.draftStore,\n+ action,\n+ );\n+\nreturn {\nstate: {\n...state,\nnavInfo: reduceBaseNavInfo(state.navInfo, action),\n+ draftStore,\nentryStore,\nloadingStatuses: reduceLoadingStatuses(state.loadingStatuses, action),\ncurrentUserInfo: reduceCurrentUserInfo(state.currentUserInfo, action),\n@@ -100,6 +107,7 @@ export default function baseReducer<N: BaseNavInfo, T: BaseAppState<N>>(\ndataLoaded: reduceDataLoaded(state.dataLoaded, action),\n},\nstoreOperations: {\n+ draftStoreOperations,\nthreadStoreOperations,\nmessageStoreOperations,\n},\n" }, { "change_type": "MODIFY", "old_path": "lib/types/store-ops-types.js", "new_path": "lib/types/store-ops-types.js", "diff": "// @flow\n+\n+import type { DraftStoreOperation } from './draft-types';\nimport type { MessageStoreOperation } from './message-types';\nimport type { ThreadStoreOperation } from './thread-types';\nexport type StoreOperations = {\n+ +draftStoreOperations: $ReadOnlyArray<DraftStoreOperation>,\n+threadStoreOperations: $ReadOnlyArray<ThreadStoreOperation>,\n+messageStoreOperations: $ReadOnlyArray<MessageStoreOperation>,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Implement draft reducer and use it in master reducer Summary: This differential implements draft reducer and uses it in master reducer Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, ashoat Reviewed By: tomek, atul, ashoat Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5646
129,196
16.11.2022 14:09:00
-3,600
ee8553ccdb3d5c2fd94d1bb6d7d7489d344633d9
Implement DraftStoreOperations C++ utility Summary: This differential implements DraftStoreOperations C++ utility to convert drafts related redux actions payloads to DatabaseQueryExecutor calls. Test Plan: This differential only introduces C++ header file, so it is not possible to create test plan. Reviewers: tomek, atul, jon Subscribers: ashoat, abosh
[ { "change_type": "ADD", "old_path": null, "new_path": "native/cpp/CommonCpp/NativeModules/DraftStoreOperations.h", "diff": "+#pragma once\n+\n+namespace comm {\n+class DraftStoreOperationBase {\n+public:\n+ virtual void execute() = 0;\n+ virtual ~DraftStoreOperationBase(){};\n+};\n+\n+class UpdateDraftOperation : public DraftStoreOperationBase {\n+public:\n+ UpdateDraftOperation(jsi::Runtime &rt, const jsi::Object &payload)\n+ : key{payload.getProperty(rt, \"key\").asString(rt).utf8(rt)},\n+ text{payload.getProperty(rt, \"text\").asString(rt).utf8(rt)} {\n+ }\n+ virtual void execute() override {\n+ DatabaseManager::getQueryExecutor().updateDraft(this->key, this->text);\n+ }\n+\n+private:\n+ std::string key;\n+ std::string text;\n+};\n+\n+class MoveDraftOperation : public DraftStoreOperationBase {\n+public:\n+ MoveDraftOperation(jsi::Runtime &rt, const jsi::Object &payload)\n+ : oldKey{payload.getProperty(rt, \"oldKey\").asString(rt).utf8(rt)},\n+ newKey{payload.getProperty(rt, \"newKey\").asString(rt).utf8(rt)} {\n+ }\n+ virtual void execute() override {\n+ DatabaseManager::getQueryExecutor().moveDraft(this->oldKey, this->newKey);\n+ }\n+\n+private:\n+ std::string oldKey;\n+ std::string newKey;\n+};\n+\n+class RemoveAllDraftsOperation : public DraftStoreOperationBase {\n+public:\n+ virtual void execute() override {\n+ DatabaseManager::getQueryExecutor().removeAllDrafts();\n+ }\n+};\n+\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Implement DraftStoreOperations C++ utility Summary: This differential implements DraftStoreOperations C++ utility to convert drafts related redux actions payloads to DatabaseQueryExecutor calls. Test Plan: This differential only introduces C++ header file, so it is not possible to create test plan. Reviewers: tomek, atul, jon Reviewed By: tomek, atul Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5647
129,196
16.11.2022 14:15:24
-3,600
15cd91b15b5f0ac7d90b7d5a2f3b956df9b15058
Implement draft store operations processing in CommCoreModule Summary: This differential implements draft store processing functionality in CommCoreModule to enable bulk drafts dump to SQLite. Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, jon Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "diff": "#include \"CommCoreModule.h\"\n#include \"../CryptoTools/DeviceID.h\"\n#include \"DatabaseManager.h\"\n+#include \"DraftStoreOperations.h\"\n#include \"GRPCStreamHostObject.h\"\n#include \"InternalModules/GlobalDBSingleton.h\"\n#include \"InternalModules/GlobalNetworkSingleton.h\"\n@@ -319,11 +320,83 @@ jsi::Value CommCoreModule::getAllMessages(jsi::Runtime &rt) {\n});\n}\n-#define REKEY_OPERATION \"rekey\"\n-#define REMOVE_OPERATION \"remove\"\n-#define REPLACE_OPERATION \"replace\"\n-#define REMOVE_MSGS_FOR_THREADS_OPERATION \"remove_messages_for_threads\"\n-#define REMOVE_ALL_OPERATION \"remove_all\"\n+const std::string UPDATE_DRAFT_OPERATION = \"update\";\n+const std::string MOVE_DRAFT_OPERATION = \"move\";\n+const std::string REMOVE_ALL_DRAFTS_OPERATION = \"remove_all\";\n+\n+std::vector<std::unique_ptr<DraftStoreOperationBase>>\n+createDraftStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) {\n+ std::vector<std::unique_ptr<DraftStoreOperationBase>> draftStoreOps;\n+ for (auto idx = 0; idx < operations.size(rt); idx++) {\n+ auto op = operations.getValueAtIndex(rt, idx).asObject(rt);\n+ auto op_type = op.getProperty(rt, \"type\").asString(rt).utf8(rt);\n+ auto payload_obj = op.getProperty(rt, \"payload\").asObject(rt);\n+ if (op_type == UPDATE_DRAFT_OPERATION) {\n+ draftStoreOps.push_back(\n+ std::make_unique<UpdateDraftOperation>(rt, payload_obj));\n+ } else if (op_type == MOVE_DRAFT_OPERATION) {\n+ draftStoreOps.push_back(\n+ std::make_unique<MoveDraftOperation>(rt, payload_obj));\n+ } else if (op_type == REMOVE_ALL_DRAFTS_OPERATION) {\n+ draftStoreOps.push_back(std::make_unique<RemoveAllDraftsOperation>());\n+ } else {\n+ throw std::runtime_error(\"unsupported operation: \" + op_type);\n+ }\n+ }\n+ return draftStoreOps;\n+}\n+\n+jsi::Value CommCoreModule::processDraftStoreOperations(\n+ jsi::Runtime &rt,\n+ const jsi::Array &operations) {\n+ std::string createOperationsError;\n+ std::shared_ptr<std::vector<std::unique_ptr<DraftStoreOperationBase>>>\n+ draftStoreOpsPtr;\n+ try {\n+ auto draftStoreOps = createDraftStoreOperations(rt, operations);\n+ draftStoreOpsPtr =\n+ std::make_shared<std::vector<std::unique_ptr<DraftStoreOperationBase>>>(\n+ std::move(draftStoreOps));\n+ } catch (std::runtime_error &e) {\n+ createOperationsError = e.what();\n+ }\n+\n+ return createPromiseAsJSIValue(\n+ rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {\n+ taskType job = [=]() {\n+ std::string error = createOperationsError;\n+\n+ if (!error.size()) {\n+ try {\n+ DatabaseManager::getQueryExecutor().beginTransaction();\n+ for (const auto &operation : *draftStoreOpsPtr) {\n+ operation->execute();\n+ }\n+ DatabaseManager::getQueryExecutor().commitTransaction();\n+ } catch (std::system_error &e) {\n+ error = e.what();\n+ DatabaseManager::getQueryExecutor().rollbackTransaction();\n+ }\n+ }\n+\n+ this->jsInvoker_->invokeAsync([=]() {\n+ if (error.size()) {\n+ promise->reject(error);\n+ } else {\n+ promise->resolve(jsi::Value::undefined());\n+ }\n+ });\n+ };\n+ GlobalDBSingleton::instance.scheduleOrRunCancellable(job);\n+ });\n+}\n+\n+const std::string REKEY_OPERATION = \"rekey\";\n+const std::string REMOVE_OPERATION = \"remove\";\n+const std::string REPLACE_OPERATION = \"replace\";\n+const std::string REMOVE_MSGS_FOR_THREADS_OPERATION =\n+ \"remove_messages_for_threads\";\n+const std::string REMOVE_ALL_OPERATION = \"remove_all\";\nstd::vector<std::unique_ptr<MessageStoreOperationBase>>\ncreateMessageStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) {\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -35,6 +35,9 @@ class CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\njsi::Value removeAllDrafts(jsi::Runtime &rt) override;\njsi::Value getAllMessages(jsi::Runtime &rt) override;\njsi::Array getAllMessagesSync(jsi::Runtime &rt) override;\n+ jsi::Value processDraftStoreOperations(\n+ jsi::Runtime &rt,\n+ const jsi::Array &operations) override;\njsi::Value processMessageStoreOperations(\njsi::Runtime &rt,\nconst jsi::Array &operations) override;\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/_generated/NativeModules.cpp", "new_path": "native/cpp/CommonCpp/_generated/NativeModules.cpp", "diff": "@@ -33,6 +33,9 @@ static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages(j\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllMessagesSync(rt);\n}\n+static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processDraftStoreOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\n+ return static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->processDraftStoreOperations(rt, args[0].getObject(rt).getArray(rt));\n+}\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperations(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->processMessageStoreOperations(rt, args[0].getObject(rt).getArray(rt));\n}\n@@ -99,6 +102,7 @@ CommCoreModuleSchemaCxxSpecJSI::CommCoreModuleSchemaCxxSpecJSI(std::shared_ptr<C\nmethodMap_[\"removeAllDrafts\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_removeAllDrafts};\nmethodMap_[\"getAllMessages\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages};\nmethodMap_[\"getAllMessagesSync\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync};\n+ methodMap_[\"processDraftStoreOperations\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processDraftStoreOperations};\nmethodMap_[\"processMessageStoreOperations\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperations};\nmethodMap_[\"processMessageStoreOperationsSync\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperationsSync};\nmethodMap_[\"getAllThreads\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreads};\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/_generated/NativeModules.h", "new_path": "native/cpp/CommonCpp/_generated/NativeModules.h", "diff": "@@ -25,6 +25,7 @@ virtual jsi::Value getAllDrafts(jsi::Runtime &rt) = 0;\nvirtual jsi::Value removeAllDrafts(jsi::Runtime &rt) = 0;\nvirtual jsi::Value getAllMessages(jsi::Runtime &rt) = 0;\nvirtual jsi::Array getAllMessagesSync(jsi::Runtime &rt) = 0;\n+virtual jsi::Value processDraftStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual jsi::Value processMessageStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual void processMessageStoreOperationsSync(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual jsi::Value getAllThreads(jsi::Runtime &rt) = 0;\n" }, { "change_type": "MODIFY", "old_path": "native/schema/CommCoreModuleSchema.js", "new_path": "native/schema/CommCoreModuleSchema.js", "diff": "import { TurboModuleRegistry } from 'react-native';\nimport type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';\n+import type { ClientDBDraftStoreOperation } from 'lib/types/draft-types';\nimport type {\nClientDBMessageInfo,\nClientDBMessageStoreOperation,\n@@ -27,6 +28,9 @@ export interface Spec extends TurboModule {\n+removeAllDrafts: () => Promise<void>;\n+getAllMessages: () => Promise<$ReadOnlyArray<ClientDBMessageInfo>>;\n+getAllMessagesSync: () => $ReadOnlyArray<ClientDBMessageInfo>;\n+ +processDraftStoreOperations: (\n+ operations: $ReadOnlyArray<ClientDBDraftStoreOperation>,\n+ ) => Promise<void>;\n+processMessageStoreOperations: (\noperations: $ReadOnlyArray<ClientDBMessageStoreOperation>,\n) => Promise<void>;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Implement draft store operations processing in CommCoreModule Summary: This differential implements draft store processing functionality in CommCoreModule to enable bulk drafts dump to SQLite. Test Plan: Make sure eslint and flow do not point errors. Reviewers: tomek, atul, jon Reviewed By: tomek, atul Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5648
129,196
16.11.2022 14:19:20
-3,600
ee59fc68892d78faca08c8a096646f930e4f263f
Persist drafts in SQLite Summary: This differential uses new CommCoreModule functionality to persist drafts in SQLite database. Test Plan: At this point a potential test would involve dispatching appriproate redux action and examine flipper and SQLite. Reviewers: atul, tomek Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/redux/redux-setup.js", "new_path": "native/redux/redux-setup.js", "diff": "@@ -349,7 +349,11 @@ function reducer(state: AppState = defaultState, action: Action) {\nstate = baseReducerResult.state;\nconst { storeOperations } = baseReducerResult;\n- const { threadStoreOperations, messageStoreOperations } = storeOperations;\n+ const {\n+ draftStoreOperations,\n+ threadStoreOperations,\n+ messageStoreOperations,\n+ } = storeOperations;\nconst fixUnreadActiveThreadResult = fixUnreadActiveThread(state, action);\nstate = fixUnreadActiveThreadResult.state;\n@@ -382,6 +386,11 @@ function reducer(state: AppState = defaultState, action: Action) {\n),\n);\n}\n+ if (draftStoreOperations.length > 0) {\n+ promises.push(\n+ commCoreModule.processDraftStoreOperations(draftStoreOperations),\n+ );\n+ }\nawait Promise.all(promises);\n} catch (e) {\nif (isTaskCancelledError(e)) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Persist drafts in SQLite Summary: This differential uses new CommCoreModule functionality to persist drafts in SQLite database. Test Plan: At this point a potential test would involve dispatching appriproate redux action and examine flipper and SQLite. Reviewers: atul, tomek Reviewed By: atul, tomek Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5649
129,196
23.11.2022 15:08:36
-3,600
755db82cfb9b3d5347aee744c08ada4c37318e86
Introduce bulk db store redux action Summary: This differential defines types for new bulk db store redux action Test Plan: Make sure eslint and flow do not complain Reviewers: atul, tomek Subscribers: ashoat
[ { "change_type": "ADD", "old_path": null, "new_path": "lib/actions/client-db-store-actions.js", "diff": "+// @flow\n+\n+const setClientDBStoreActionType = 'SET_CLIENT_DB_STORE';\n+\n+export { setClientDBStoreActionType };\n" }, { "change_type": "MODIFY", "old_path": "lib/types/draft-types.js", "new_path": "lib/types/draft-types.js", "diff": "@@ -4,6 +4,11 @@ export type DraftStore = {\n+drafts: { +[key: string]: string },\n};\n+export type ClientDBDraftInfo = {\n+ +key: string,\n+ +text: string,\n+};\n+\nexport type UpdateDraftOperation = {\n+type: 'update',\n+payload: { +key: string, +text: string },\n@@ -22,4 +27,5 @@ export type DraftStoreOperation =\n| UpdateDraftOperation\n| MoveDraftOperation\n| RemoveAllDraftsOperation;\n+\nexport type ClientDBDraftStoreOperation = DraftStoreOperation;\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -13,7 +13,7 @@ import type {\nQueueActivityUpdatesPayload,\nSetThreadUnreadStatusPayload,\n} from './activity-types';\n-import type { DraftStore } from './draft-types';\n+import type { ClientDBDraftInfo, DraftStore } from './draft-types';\nimport type { EnabledApps, SupportedApps } from './enabled-apps';\nimport type {\nRawEntryInfo,\n@@ -556,6 +556,15 @@ export type BaseAction =\n+type: 'SET_DRAFT_STORE_DRAFTS',\n+payload: $ReadOnlyArray<{ +key: string, +text: string }>,\n}\n+ | {\n+ +type: 'SET_CLIENT_DB_STORE',\n+ +payload: {\n+ +currentUserID: ?string,\n+ +drafts: $ReadOnlyArray<ClientDBDraftInfo>,\n+ +messages: $ReadOnlyArray<ClientDBMessageInfo>,\n+ +threadStore: ThreadStore,\n+ },\n+ }\n| {\n+type: 'UPDATE_ACTIVITY_STARTED',\n+payload?: void,\n" }, { "change_type": "MODIFY", "old_path": "native/schema/CommCoreModuleSchema.js", "new_path": "native/schema/CommCoreModuleSchema.js", "diff": "import { TurboModuleRegistry } from 'react-native';\nimport type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';\n-import type { ClientDBDraftStoreOperation } from 'lib/types/draft-types';\n+import type {\n+ ClientDBDraftInfo,\n+ ClientDBDraftStoreOperation,\n+} from 'lib/types/draft-types';\nimport type {\nClientDBMessageInfo,\nClientDBMessageStoreOperation,\n@@ -15,11 +18,6 @@ import type {\nClientDBThreadStoreOperation,\n} from 'lib/types/thread-types';\n-type ClientDBDraftInfo = {\n- +key: string,\n- +text: string,\n-};\n-\nexport interface Spec extends TurboModule {\n+getDraft: (key: string) => Promise<string>;\n+updateDraft: (draft: ClientDBDraftInfo) => Promise<boolean>;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Introduce bulk db store redux action Summary: This differential defines types for new bulk db store redux action Test Plan: Make sure eslint and flow do not complain Reviewers: atul, tomek Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5708
129,196
23.11.2022 15:40:36
-3,600
bef6581335f201505892ba37f57d43ecb5261dff
Remove old redux actions Summary: This differential removes old unnecessary redux actions Test Plan: Make sure eslint and flow do not complain Reviewers: atul, tomek Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "lib/actions/draft-actions.js", "new_path": "lib/actions/draft-actions.js", "diff": "const updateDraftActionType = 'UPDATE_DRAFT';\nconst moveDraftActionType = 'MOVE_DRAFT';\n-const setDraftStoreDrafts = 'SET_DRAFT_STORE_DRAFTS';\n-export { updateDraftActionType, moveDraftActionType, setDraftStoreDrafts };\n+export { updateDraftActionType, moveDraftActionType };\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/message-actions.js", "new_path": "lib/actions/message-actions.js", "diff": "@@ -199,7 +199,6 @@ const legacySendMultimediaMessage = (\nconst saveMessagesActionType = 'SAVE_MESSAGES';\nconst processMessagesActionType = 'PROCESS_MESSAGES';\nconst messageStorePruneActionType = 'MESSAGE_STORE_PRUNE';\n-const setMessageStoreMessages = 'SET_MESSAGE_STORE_MESSAGES';\nexport {\nfetchMessagesBeforeCursorActionTypes,\n@@ -217,5 +216,4 @@ export {\nsaveMessagesActionType,\nprocessMessagesActionType,\nmessageStorePruneActionType,\n- setMessageStoreMessages,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/thread-actions.js", "new_path": "lib/actions/thread-actions.js", "diff": "@@ -161,7 +161,6 @@ const leaveThread = (\nupdatesResult: response.updatesResult,\n};\n};\n-const setThreadStoreActionType = 'SET_THREAD_STORE';\nexport {\ndeleteThreadActionTypes,\n@@ -178,5 +177,4 @@ export {\njoinThread,\nleaveThreadActionTypes,\nleaveThread,\n- setThreadStoreActionType,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -552,10 +552,6 @@ export type BaseAction =\n+newKey: string,\n},\n}\n- | {\n- +type: 'SET_DRAFT_STORE_DRAFTS',\n- +payload: $ReadOnlyArray<{ +key: string, +text: string }>,\n- }\n| {\n+type: 'SET_CLIENT_DB_STORE',\n+payload: {\n@@ -737,10 +733,6 @@ export type BaseAction =\n+type: 'MESSAGE_STORE_PRUNE',\n+payload: MessageStorePrunePayload,\n}\n- | {\n- +type: 'SET_MESSAGE_STORE_MESSAGES',\n- +payload: $ReadOnlyArray<ClientDBMessageInfo>,\n- }\n| {\n+type: 'SET_LATE_RESPONSE',\n+payload: SetLateResponsePayload,\n@@ -807,10 +799,6 @@ export type BaseAction =\n+type: 'SET_THREAD_UNREAD_STATUS_SUCCESS',\n+payload: SetThreadUnreadStatusPayload,\n}\n- | {\n- +type: 'SET_THREAD_STORE',\n- +payload: ThreadStore,\n- }\n| {\n+type: 'SET_USER_SETTINGS_STARTED',\n+payload?: void,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Remove old redux actions Summary: This differential removes old unnecessary redux actions Test Plan: Make sure eslint and flow do not complain Reviewers: atul, tomek Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5712
129,180
25.11.2022 12:38:40
-3,600
fd77f5bcf28a7e058e004f03afeaa7958f085dee
[web] Added on enter animation for typeahead overlay. Summary: As specified in the design, added 100ms ease-in animation. Test Plan: See video: {F260966} Reviewers: tomek, atul, kamil Subscribers: ashoat, kamil, atul, tomek
[ { "change_type": "MODIFY", "old_path": "web/chat/mention-suggestion-tooltip.css", "new_path": "web/chat/mention-suggestion-tooltip.css", "diff": ".suggestion:hover {\nbackground-color: var(--typeahead-overlay-light);\n}\n+\n+.notVisible {\n+ opacity: 0;\n+}\n+\n+.visible {\n+ opacity: 1;\n+ transition: opacity 100ms ease-in;\n+}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/mention-suggestion-tooltip.react.js", "new_path": "web/chat/mention-suggestion-tooltip.react.js", "diff": "// @flow\n+import classNames from 'classnames';\nimport * as React from 'react';\nimport SearchIndex from 'lib/shared/search-index';\n@@ -36,6 +37,13 @@ function MentionSuggestionTooltip(\nviewerID,\nmatchedStrings,\n} = props;\n+ const [isVisible, setIsVisible] = React.useState(false);\n+\n+ React.useEffect(() => {\n+ setIsVisible(true);\n+\n+ return () => setIsVisible(false);\n+ }, [setIsVisible]);\nconst {\nentireText: matchedText,\n@@ -103,8 +111,13 @@ function MentionSuggestionTooltip(\nreturn null;\n}\n+ const overlayClasses = classNames(css.suggestionsContainer, {\n+ [css.notVisible]: !isVisible,\n+ [css.visible]: isVisible,\n+ });\n+\nreturn (\n- <div className={css.suggestionsContainer} style={tooltipPositionStyle}>\n+ <div className={overlayClasses} style={tooltipPositionStyle}>\n{tooltipButtons}\n</div>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Added on enter animation for typeahead overlay. Summary: As specified in the design, added 100ms ease-in animation. Test Plan: See video: {F260966} Reviewers: tomek, atul, kamil Reviewed By: tomek Subscribers: ashoat, kamil, atul, tomek Differential Revision: https://phab.comm.dev/D5726
129,184
29.11.2022 13:34:12
28,800
d2ad76b2f49447f5ec002744f7668f446166c6af
[native] `codeVersion` -> 156
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 155\n- versionName '1.0.155'\n+ versionCode 156\n+ versionName '1.0.156'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{155};\n+ const int codeVersion{156};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 155;\n+ CURRENT_PROJECT_VERSION = 156;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.155;\n+ MARKETING_VERSION = 1.0.156;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 155;\n+ CURRENT_PROJECT_VERSION = 156;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.155;\n+ MARKETING_VERSION = 1.0.156;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.155</string>\n+ <string>1.0.156</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>155</string>\n+ <string>156</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.155</string>\n+ <string>1.0.156</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>155</string>\n+ <string>156</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 156
129,184
29.11.2022 13:37:23
28,800
1317473ae1be244ba890c438e82ed8883ca39cf7
[native] `codeVersion` -> 157
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 156\n- versionName '1.0.156'\n+ versionCode 157\n+ versionName '1.0.157'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{156};\n+ const int codeVersion{157};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 156;\n+ CURRENT_PROJECT_VERSION = 157;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.156;\n+ MARKETING_VERSION = 1.0.157;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 156;\n+ CURRENT_PROJECT_VERSION = 157;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.156;\n+ MARKETING_VERSION = 1.0.157;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.156</string>\n+ <string>1.0.157</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>156</string>\n+ <string>157</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.156</string>\n+ <string>1.0.157</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>156</string>\n+ <string>157</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 157
129,184
29.11.2022 18:12:10
28,800
4c9e7ca31451ab1762974c140a12e98beb22ab1a
[native] `codeVersion` -> 158
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 157\n- versionName '1.0.157'\n+ versionCode 158\n+ versionName '1.0.158'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{157};\n+ const int codeVersion{158};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 157;\n+ CURRENT_PROJECT_VERSION = 158;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.157;\n+ MARKETING_VERSION = 1.0.158;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 157;\n+ CURRENT_PROJECT_VERSION = 158;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.157;\n+ MARKETING_VERSION = 1.0.158;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.157</string>\n+ <string>1.0.158</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>157</string>\n+ <string>158</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.157</string>\n+ <string>1.0.158</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>157</string>\n+ <string>158</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 158
129,184
30.11.2022 09:00:52
28,800
c0e7c7b53b61484198b3e79dd8ddf3b4f5ca22bc
[native] `codeVersion` -> 159
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 158\n- versionName '1.0.158'\n+ versionCode 159\n+ versionName '1.0.159'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{158};\n+ const int codeVersion{159};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 158;\n+ CURRENT_PROJECT_VERSION = 159;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.158;\n+ MARKETING_VERSION = 1.0.159;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 158;\n+ CURRENT_PROJECT_VERSION = 159;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.158;\n+ MARKETING_VERSION = 1.0.159;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.158</string>\n+ <string>1.0.159</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>158</string>\n+ <string>159</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.158</string>\n+ <string>1.0.159</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>158</string>\n+ <string>159</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 159
129,184
30.11.2022 09:04:57
28,800
3bba43519de16bf90b7f91aa050589b4158b43d3
[native] `codeVersion` -> 160
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 159\n- versionName '1.0.159'\n+ versionCode 160\n+ versionName '1.0.160'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{159};\n+ const int codeVersion{160};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 159;\n+ CURRENT_PROJECT_VERSION = 160;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.159;\n+ MARKETING_VERSION = 1.0.160;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 159;\n+ CURRENT_PROJECT_VERSION = 160;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.159;\n+ MARKETING_VERSION = 1.0.160;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.159</string>\n+ <string>1.0.160</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>159</string>\n+ <string>160</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.159</string>\n+ <string>1.0.160</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>159</string>\n+ <string>160</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 160
129,187
24.11.2022 11:05:03
18,000
cad6ae6523f2b7696d7af0264dd9f71449a0eaa9
[native] Introduce TextMessageMarkdownContext Summary: We need the AST from inside `InnerTextMessage` in order to determine whether the Markdown has any "pressables" (link or spoiler for now, but in the future). Test Plan: Flow, tested with following diff Reviewers: rohan, atul, ginsu, michal Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/chat/inner-text-message.react.js", "new_path": "native/chat/inner-text-message.react.js", "diff": "@@ -18,6 +18,10 @@ import {\nfilterCorners,\ngetRoundedContainerStyle,\n} from './rounded-corners';\n+import {\n+ TextMessageMarkdownContext,\n+ useTextMessageMarkdown,\n+} from './text-message-markdown-context';\n/* eslint-disable import/no-named-as-default-member */\nconst { Node } = Animated;\n@@ -83,6 +87,7 @@ function InnerTextMessage(props: Props): React.Node {\n}\nconst rules = useTextMessageMarkdownRules(darkColor);\n+ const textMessageMarkdown = useTextMessageMarkdown(item.messageInfo);\nconst markdownStyles = React.useMemo(() => {\nconst textStyle = {\n@@ -95,6 +100,7 @@ function InnerTextMessage(props: Props): React.Node {\n}, [darkColor]);\nconst message = (\n+ <TextMessageMarkdownContext.Provider value={textMessageMarkdown}>\n<TouchableWithoutFeedback>\n<View>\n<GestureTouchableOpacity\n@@ -110,6 +116,7 @@ function InnerTextMessage(props: Props): React.Node {\n</GestureTouchableOpacity>\n</View>\n</TouchableWithoutFeedback>\n+ </TextMessageMarkdownContext.Provider>\n);\n// We need to set onLayout in order to allow .measure() to be on the ref\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/chat/text-message-markdown-context.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import * as SimpleMarkdown from 'simple-markdown';\n+\n+import type { SingleASTNode } from 'lib/shared/markdown';\n+import { messageKey } from 'lib/shared/message-utils';\n+import type { TextMessageInfo } from 'lib/types/messages/text';\n+\n+import { useTextMessageMarkdownRules } from '../chat/message-list-types';\n+\n+export type TextMessageMarkdownContextType = {\n+ +messageKey: string,\n+ +markdownAST: $ReadOnlyArray<SingleASTNode>,\n+};\n+\n+const TextMessageMarkdownContext: React.Context<?TextMessageMarkdownContextType> = React.createContext<?TextMessageMarkdownContextType>(\n+ null,\n+);\n+\n+function useTextMessageMarkdown(\n+ messageInfo: TextMessageInfo,\n+): TextMessageMarkdownContextType {\n+ // useDarkStyle doesn't affect the AST (only the styles),\n+ // so we can safely just set it to false here\n+ const rules = useTextMessageMarkdownRules(false);\n+ const { simpleMarkdownRules, container } = rules;\n+\n+ const { text } = messageInfo;\n+ const ast = React.useMemo(() => {\n+ const parser = SimpleMarkdown.parserFor(simpleMarkdownRules);\n+ return parser(text, { disableAutoBlockNewlines: true, container });\n+ }, [simpleMarkdownRules, text, container]);\n+\n+ const key = messageKey(messageInfo);\n+ return React.useMemo(\n+ () => ({\n+ messageKey: key,\n+ markdownAST: ast,\n+ }),\n+ [key, ast],\n+ );\n+}\n+\n+export { TextMessageMarkdownContext, useTextMessageMarkdown };\n" }, { "change_type": "MODIFY", "old_path": "native/markdown/markdown.react.js", "new_path": "native/markdown/markdown.react.js", "diff": "@@ -8,6 +8,7 @@ import * as SimpleMarkdown from 'simple-markdown';\nimport { onlyEmojiRegex } from 'lib/shared/emojis';\n+import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context';\nimport type { TextStyle } from '../types/styles';\nimport type { MarkdownRules } from './rules.react';\n@@ -20,14 +21,18 @@ function Markdown(props: Props): React.Node {\nconst { style, children, rules } = props;\nconst { simpleMarkdownRules, emojiOnlyFactor, container } = rules;\n- const parser = React.useMemo(\n- () => SimpleMarkdown.parserFor(simpleMarkdownRules),\n- [simpleMarkdownRules],\n- );\n- const ast = React.useMemo(\n- () => parser(children, { disableAutoBlockNewlines: true, container }),\n- [parser, children, container],\n+ const textMessageMarkdownContext = React.useContext(\n+ TextMessageMarkdownContext,\n);\n+ const textMessageMarkdownAST = textMessageMarkdownContext?.markdownAST;\n+\n+ const ast = React.useMemo(() => {\n+ if (textMessageMarkdownAST) {\n+ return textMessageMarkdownAST;\n+ }\n+ const parser = SimpleMarkdown.parserFor(simpleMarkdownRules);\n+ return parser(children, { disableAutoBlockNewlines: true, container });\n+ }, [textMessageMarkdownAST, simpleMarkdownRules, children, container]);\nconst output = React.useMemo(\n() => SimpleMarkdown.outputFor(simpleMarkdownRules, 'react'),\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Introduce TextMessageMarkdownContext Summary: We need the AST from inside `InnerTextMessage` in order to determine whether the Markdown has any "pressables" (link or spoiler for now, but @mention in the future). Test Plan: Flow, tested with following diff Reviewers: rohan, atul, ginsu, michal Reviewed By: rohan Subscribers: tomek Differential Revision: https://phab.comm.dev/D5754
129,187
29.11.2022 21:27:41
18,000
b589a7bbd40be4b99be2eeb867f6b2ea01bf78d3
[native] Pass TextMessage.onPress down via context Summary: Descendants of this component will need to call `onPress`. Test Plan: I tested this in combination with the next diff. See attached video in the next diff Reviewers: rohan, atul, ginsu, michal Subscribers: tomek
[ { "change_type": "ADD", "old_path": null, "new_path": "native/chat/message-press-responder-context.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+export type MessagePressResponderContextType = {\n+ +onPressMessage: () => void,\n+};\n+\n+const MessagePressResponderContext: React.Context<?MessagePressResponderContextType> = React.createContext<?MessagePressResponderContextType>(\n+ null,\n+);\n+\n+export { MessagePressResponderContext };\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-button.react.js", "new_path": "native/chat/text-message-tooltip-button.react.js", "diff": "@@ -10,6 +10,7 @@ import { TooltipInlineSidebar } from './inline-sidebar.react';\nimport { InnerTextMessage } from './inner-text-message.react';\nimport { MessageHeader } from './message-header.react';\nimport { MessageListContextProvider } from './message-list-types';\n+import { MessagePressResponderContext } from './message-press-responder-context';\nimport SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react';\nimport { useAnimatedMessageTooltipButton } from './utils';\n@@ -67,6 +68,13 @@ function TextMessageTooltipButton(props: Props): React.Node {\nconst threadID = item.threadInfo.id;\nconst { navigation, isOpeningSidebar } = props;\n+ const messagePressResponderContext = React.useMemo(\n+ () => ({\n+ onPressMessage: navigation.goBackOnce,\n+ }),\n+ [navigation.goBackOnce],\n+ );\n+\nconst inlineSidebar = React.useMemo(() => {\nif (!item.threadCreatedFromMessage) {\nreturn null;\n@@ -92,12 +100,16 @@ function TextMessageTooltipButton(props: Props): React.Node {\n<Animated.View style={headerStyle}>\n<MessageHeader item={item} focused={true} display=\"modal\" />\n</Animated.View>\n+ <MessagePressResponderContext.Provider\n+ value={messagePressResponderContext}\n+ >\n<InnerTextMessage\nitem={item}\nonPress={navigation.goBackOnce}\nthreadColorOverride={threadColorOverride}\nisThreadColorDarkOverride={isThreadColorDarkOverride}\n/>\n+ </MessagePressResponderContext.Provider>\n{inlineSidebar}\n</Animated.View>\n</MessageListContextProvider>\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -25,6 +25,10 @@ import type { VerticalBounds } from '../types/layout-types';\nimport type { ChatNavigationProp } from './chat.react';\nimport ComposedMessage from './composed-message.react';\nimport { InnerTextMessage } from './inner-text-message.react';\n+import {\n+ MessagePressResponderContext,\n+ type MessagePressResponderContextType,\n+} from './message-press-responder-context';\nimport textMessageSendFailed from './text-message-send-failed';\nimport { getMessageTooltipKey } from './utils';\n@@ -50,6 +54,14 @@ type Props = {\n};\nclass TextMessage extends React.PureComponent<Props> {\nmessage: ?React.ElementRef<typeof View>;\n+ messagePressResponderContext: MessagePressResponderContextType;\n+\n+ constructor(props: Props) {\n+ super(props);\n+ this.messagePressResponderContext = {\n+ onPressMessage: this.onPress,\n+ };\n+ }\nrender() {\nconst {\n@@ -81,6 +93,9 @@ class TextMessage extends React.PureComponent<Props> {\n}\nreturn (\n+ <MessagePressResponderContext.Provider\n+ value={this.messagePressResponderContext}\n+ >\n<ComposedMessage\nitem={item}\nsendFailed={textMessageSendFailed(item)}\n@@ -94,6 +109,7 @@ class TextMessage extends React.PureComponent<Props> {\nmessageRef={this.messageRef}\n/>\n</ComposedMessage>\n+ </MessagePressResponderContext.Provider>\n);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Pass TextMessage.onPress down via context Summary: Descendants of this component will need to call `onPress`. Test Plan: I tested this in combination with the next diff. See attached video in the next diff Reviewers: rohan, atul, ginsu, michal Reviewed By: rohan, atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D5763
129,187
29.11.2022 23:07:11
18,000
7988ebdc2edd981bc11339f8bb78efc0f1d26a18
[native] Normalize Android MarkdownLink behavior to match iOS Test Plan: I tested this on iOS and Android while pressing all over a message, before and after opening the modal. See attached video in previous diff Reviewers: rohan, atul, ginsu, michal Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -50,7 +50,6 @@ type Props = {\n// MarkdownLinkContext\n+chatContext: ?ChatContextType,\n+linkModalActive: boolean,\n- +linkIsBlockingPresses: boolean,\n};\nclass TextMessage extends React.PureComponent<Props> {\nmessage: ?React.ElementRef<typeof View>;\n@@ -74,7 +73,6 @@ class TextMessage extends React.PureComponent<Props> {\noverlayContext,\nchatContext,\nlinkModalActive,\n- linkIsBlockingPresses,\ncanCreateSidebarFromMessage,\n...viewProps\n} = this.props;\n@@ -160,9 +158,9 @@ class TextMessage extends React.PureComponent<Props> {\nconst {\nmessage,\n- props: { verticalBounds, linkIsBlockingPresses },\n+ props: { verticalBounds, linkModalActive },\n} = this;\n- if (!message || !verticalBounds || linkIsBlockingPresses) {\n+ if (!message || !verticalBounds || linkModalActive) {\nreturn;\n}\n@@ -225,20 +223,17 @@ const ConnectedTextMessage: React.ComponentType<BaseProps> = React.memo<BaseProp\nconst chatContext = React.useContext(ChatContext);\nconst [linkModalActive, setLinkModalActive] = React.useState(false);\n- const [linkPressActive, setLinkPressActive] = React.useState(false);\nconst markdownLinkContext = React.useMemo(\n() => ({\nsetLinkModalActive,\n- setLinkPressActive,\n}),\n- [setLinkModalActive, setLinkPressActive],\n+ [setLinkModalActive],\n);\nconst canCreateSidebarFromMessage = useCanCreateSidebarFromMessage(\nprops.item.threadInfo,\nprops.item.messageInfo,\n);\n- const linkIsBlockingPresses = linkModalActive || linkPressActive;\nreturn (\n<MarkdownLinkContext.Provider value={markdownLinkContext}>\n<TextMessage\n@@ -247,7 +242,6 @@ const ConnectedTextMessage: React.ComponentType<BaseProps> = React.memo<BaseProp\noverlayContext={overlayContext}\nchatContext={chatContext}\nlinkModalActive={linkModalActive}\n- linkIsBlockingPresses={linkIsBlockingPresses}\n/>\n</MarkdownLinkContext.Provider>\n);\n" }, { "change_type": "MODIFY", "old_path": "native/markdown/markdown-link-context.js", "new_path": "native/markdown/markdown-link-context.js", "diff": "@@ -4,7 +4,6 @@ import * as React from 'react';\nexport type MarkdownLinkContextType = {\n+setLinkModalActive: boolean => void,\n- +setLinkPressActive: boolean => void,\n};\nconst MarkdownLinkContext: React.Context<?MarkdownLinkContextType> = React.createContext<?MarkdownLinkContextType>(\n" }, { "change_type": "MODIFY", "old_path": "native/markdown/markdown-link.react.js", "new_path": "native/markdown/markdown-link.react.js", "diff": "// @flow\nimport * as React from 'react';\n-import { Text, Linking, Alert, Platform } from 'react-native';\n+import { Text, Linking, Alert } from 'react-native';\nimport { normalizeURL } from 'lib/utils/url-utils';\n@@ -50,42 +50,10 @@ type Props = {\n...TextProps,\n};\nfunction MarkdownLink(props: Props): React.Node {\n- const markdownLinkContext = React.useContext(MarkdownLinkContext);\n-\nconst { target, ...rest } = props;\n+ const markdownLinkContext = React.useContext(MarkdownLinkContext);\nconst onPressLink = useDisplayLinkPrompt(target, markdownLinkContext);\n-\n- const setLinkPressActive = markdownLinkContext?.setLinkPressActive;\n- const androidOnStartShouldSetResponderCapture = React.useCallback(() => {\n- setLinkPressActive?.(true);\n- return true;\n- }, [setLinkPressActive]);\n-\n- const activePressHasMoved = React.useRef(false);\n- const androidOnResponderMove = React.useCallback(() => {\n- activePressHasMoved.current = true;\n- }, []);\n-\n- const androidOnResponderTerminate = React.useCallback(() => {\n- if (!activePressHasMoved.current) {\n- onPressLink();\n- }\n- activePressHasMoved.current = false;\n- setLinkPressActive?.(false);\n- }, [onPressLink, setLinkPressActive]);\n-\n- if (Platform.OS !== 'android') {\nreturn <Text onPress={onPressLink} {...rest} />;\n}\n- // The Flow type for Text's props is missing onStartShouldSetResponderCapture\n- const gestureProps: any = {\n- onStartShouldSetResponderCapture: androidOnStartShouldSetResponderCapture,\n- onResponderMove: androidOnResponderMove,\n- onResponderTerminate: androidOnResponderTerminate,\n- };\n-\n- return <Text {...gestureProps} {...rest} />;\n-}\n-\nexport default MarkdownLink;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Normalize Android MarkdownLink behavior to match iOS Test Plan: I tested this on iOS and Android while pressing all over a message, before and after opening the modal. See attached video in previous diff Reviewers: rohan, atul, ginsu, michal Reviewed By: rohan Subscribers: tomek Differential Revision: https://phab.comm.dev/D5765
129,200
28.11.2022 07:26:47
28,800
b97763fc10820c47ddc00f0af1e98fe7ab6e8071
[keyserver] expose APIs to start PAKE registration on client side Summary: using Neon to surface the Rust opaque-ke library to Node.js Test Plan: called the new APIs from a Node module and confirmed the results Reviewers: tomek, bartek, jon Subscribers: ashoat, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/addons/opaque-ke-node/src/lib.rs", "new_path": "keyserver/addons/opaque-ke-node/src/lib.rs", "diff": "+use argon2::Argon2;\n+use digest::generic_array::GenericArray;\n+use digest::Digest;\nuse neon::prelude::*;\n+use opaque_ke::ciphersuite::CipherSuite;\n+use opaque_ke::errors::InternalPakeError;\n+use opaque_ke::hash::Hash;\n+use opaque_ke::slow_hash::SlowHash;\n+use opaque_ke::{ClientRegistration, RegistrationRequest};\n+use rand::rngs::OsRng;\n-fn hello(mut cx: FunctionContext) -> JsResult<JsString> {\n- Ok(cx.string(\"hello node\"))\n+struct Cipher;\n+\n+impl CipherSuite for Cipher {\n+ type Group = curve25519_dalek::ristretto::RistrettoPoint;\n+ type KeyExchange = opaque_ke::key_exchange::tripledh::TripleDH;\n+ type Hash = sha2::Sha512;\n+ type SlowHash = ArgonWrapper;\n+}\n+\n+struct ArgonWrapper(Argon2<'static>);\n+\n+impl<D: Hash> SlowHash<D> for ArgonWrapper {\n+ fn hash(\n+ input: GenericArray<u8, <D as Digest>::OutputSize>,\n+ ) -> Result<Vec<u8>, InternalPakeError> {\n+ let params = Argon2::default();\n+ let mut output = vec![0u8; <D as Digest>::output_size()];\n+ params\n+ .hash_password_into(&input, &[0; argon2::MIN_SALT_LEN], &mut output)\n+ .map_err(|_| InternalPakeError::SlowHashError)?;\n+ Ok(output)\n+ }\n+}\n+\n+struct ClientRegistrationStartResult {\n+ message: RegistrationRequest<Cipher>,\n+ state: ClientRegistration<Cipher>,\n+}\n+\n+impl Finalize for ClientRegistrationStartResult {}\n+\n+fn client_register_start(\n+ mut cx: FunctionContext,\n+) -> JsResult<JsBox<ClientRegistrationStartResult>> {\n+ let password = cx.argument::<JsString>(0)?;\n+ let mut client_rng = OsRng;\n+ let client_registration_start_result = ClientRegistration::<Cipher>::start(\n+ &mut client_rng,\n+ password.value(&mut cx).as_bytes(),\n+ )\n+ .or_else(|err| cx.throw_error(err.to_string()))?;\n+ Ok(cx.boxed(ClientRegistrationStartResult {\n+ message: client_registration_start_result.message,\n+ state: client_registration_start_result.state,\n+ }))\n+}\n+\n+fn get_registration_start_message_array(\n+ mut cx: FunctionContext,\n+) -> JsResult<JsArrayBuffer> {\n+ let client_registration_start_result =\n+ cx.argument::<JsBox<ClientRegistrationStartResult>>(0)?;\n+ Ok(JsArrayBuffer::external(\n+ &mut cx,\n+ client_registration_start_result.message.serialize(),\n+ ))\n+}\n+\n+fn get_registration_start_state_array(\n+ mut cx: FunctionContext,\n+) -> JsResult<JsArrayBuffer> {\n+ let client_registration_start_result =\n+ cx.argument::<JsBox<ClientRegistrationStartResult>>(0)?;\n+ Ok(JsArrayBuffer::external(\n+ &mut cx,\n+ client_registration_start_result.state.serialize(),\n+ ))\n}\n#[neon::main]\nfn main(mut cx: ModuleContext) -> NeonResult<()> {\n- cx.export_function(\"hello\", hello)?;\n+ cx.export_function(\"clientRegisterStart\", client_register_start)?;\n+ cx.export_function(\n+ \"getRegistrationStartMessageArray\",\n+ get_registration_start_message_array,\n+ )?;\n+ cx.export_function(\n+ \"getRegistrationStartStateArray\",\n+ get_registration_start_state_array,\n+ )?;\nOk(())\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] expose APIs to start PAKE registration on client side Summary: using Neon to surface the Rust opaque-ke library to Node.js Test Plan: called the new APIs from a Node module and confirmed the results Reviewers: tomek, bartek, jon Reviewed By: tomek, bartek, jon Subscribers: ashoat, atul Differential Revision: https://phab.comm.dev/D5736
129,195
30.11.2022 18:48:35
18,000
8134e800efff4dabf5c1dc08784ee701cb077a5d
[native] Add spoiler to pressableMarkdownTypes Summary: Following the stack from we now add `spoiler` to the `pressableMarkdownTypes` set. Depends on D5539 Test Plan: Check spoilers on both Android and iOS, will attach a video below. {F267394} Reviewers: ashoat, atul, ginsu Subscribers: tomek, ashoat
[ { "change_type": "MODIFY", "old_path": "native/chat/text-message-markdown-context.js", "new_path": "native/chat/text-message-markdown-context.js", "diff": "@@ -18,7 +18,7 @@ export type TextMessageMarkdownContextType = {\nconst TextMessageMarkdownContext: React.Context<?TextMessageMarkdownContextType> = React.createContext<?TextMessageMarkdownContextType>(\nnull,\n);\n-const pressableMarkdownTypes = new Set(['link']);\n+const pressableMarkdownTypes = new Set(['link', 'spoiler']);\nconst markdownASTHasPressable = (node: ASTNode): boolean => {\nif (Array.isArray(node)) {\nreturn node.some(markdownASTHasPressable);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Add spoiler to pressableMarkdownTypes Summary: Following the stack from @ashoat, we now add `spoiler` to the `pressableMarkdownTypes` set. Depends on D5539 Test Plan: Check spoilers on both Android and iOS, will attach a video below. {F267394} Reviewers: ashoat, atul, ginsu Reviewed By: ashoat Subscribers: tomek, ashoat Differential Revision: https://phab.comm.dev/D5779
129,184
30.11.2022 19:38:40
28,800
2b87db1e23bd6512a3fc40ea30b33c8cccda77e0
[native] `codeVersion` -> 161
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 160\n- versionName '1.0.160'\n+ versionCode 161\n+ versionName '1.0.161'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{160};\n+ const int codeVersion{161};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 160;\n+ CURRENT_PROJECT_VERSION = 161;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.160;\n+ MARKETING_VERSION = 1.0.161;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 160;\n+ CURRENT_PROJECT_VERSION = 161;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.160;\n+ MARKETING_VERSION = 1.0.161;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.160</string>\n+ <string>1.0.161</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>160</string>\n+ <string>161</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.160</string>\n+ <string>1.0.161</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>160</string>\n+ <string>161</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 161
129,184
30.11.2022 19:46:44
28,800
9c15aefa67f0576e92ba82873f36c2d585548934
[native] `codeVersion` -> 162
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 161\n- versionName '1.0.161'\n+ versionCode 162\n+ versionName '1.0.162'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{161};\n+ const int codeVersion{162};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 161;\n+ CURRENT_PROJECT_VERSION = 162;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.161;\n+ MARKETING_VERSION = 1.0.162;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 161;\n+ CURRENT_PROJECT_VERSION = 162;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.161;\n+ MARKETING_VERSION = 1.0.162;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.161</string>\n+ <string>1.0.162</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>161</string>\n+ <string>162</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.161</string>\n+ <string>1.0.162</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>161</string>\n+ <string>162</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 162
129,196
30.11.2022 20:31:13
-3,600
08033b5cdbdff48f13f60f7c5d466770b158b88b
Use new JSI call in SQLiteDataHandler Summary: This differential replaces separate calls for each SQLite data with new bulk JSI call. Test Plan: Ensure in flipper SET_CLIENT_DB_STORE action payload is correct Reviewers: tomek, atul Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/data/sqlite-data-handler.js", "new_path": "native/data/sqlite-data-handler.js", "diff": "@@ -88,11 +88,11 @@ function SQLiteDataHandler(): React.Node {\n(async () => {\nawait sensitiveDataHandled;\ntry {\n- const [threads, messages, drafts] = await Promise.all([\n- commCoreModule.getAllThreads(),\n- commCoreModule.getAllMessages(),\n- commCoreModule.getAllDrafts(),\n- ]);\n+ const {\n+ threads,\n+ messages,\n+ drafts,\n+ } = await commCoreModule.getClientDBStore();\nconst threadInfosFromDB = convertClientDBThreadInfosToRawThreadInfos(\nthreads,\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Use new JSI call in SQLiteDataHandler Summary: This differential replaces separate calls for each SQLite data with new bulk JSI call. Test Plan: Ensure in flipper SET_CLIENT_DB_STORE action payload is correct Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5775
129,196
30.11.2022 20:42:34
-3,600
14fe7b7a0c2ed19b2d6a9816b4df8fd08cac3676
Remove unecessary JSI queries Summary: This differential removes ol unecessary JSI queries to get all drafts, threads and messages. Test Plan: Removed queries are not used anymore in the project, so the sufficient test plan is to build the app. Reviewers: tomek, atul, jon Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "diff": "@@ -306,34 +306,6 @@ jsi::Value CommCoreModule::getClientDBStore(jsi::Runtime &rt) {\n});\n}\n-jsi::Value CommCoreModule::getAllDrafts(jsi::Runtime &rt) {\n- return createPromiseAsJSIValue(\n- rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {\n- taskType job = [=, &innerRt]() {\n- std::string error;\n- std::vector<Draft> draftsVector;\n- try {\n- draftsVector = DatabaseManager::getQueryExecutor().getAllDrafts();\n- } catch (std::system_error &e) {\n- error = e.what();\n- }\n- auto draftsVectorPtr =\n- std::make_shared<std::vector<Draft>>(std::move(draftsVector));\n- this->jsInvoker_->invokeAsync(\n- [&innerRt, draftsVectorPtr, error, promise]() {\n- if (error.size()) {\n- promise->reject(error);\n- return;\n- }\n- jsi::Array jsiDrafts = parseDBDrafts(innerRt, draftsVectorPtr);\n- promise->resolve(std::move(jsiDrafts));\n- });\n- };\n- GlobalDBSingleton::instance.scheduleOrRunCancellable(\n- job, promise, this->jsInvoker_);\n- });\n-}\n-\njsi::Value CommCoreModule::removeAllDrafts(jsi::Runtime &rt) {\nreturn createPromiseAsJSIValue(\nrt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {\n@@ -369,37 +341,6 @@ jsi::Array CommCoreModule::getAllMessagesSync(jsi::Runtime &rt) {\nreturn jsiMessages;\n}\n-jsi::Value CommCoreModule::getAllMessages(jsi::Runtime &rt) {\n- return createPromiseAsJSIValue(\n- rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {\n- taskType job = [=, &innerRt]() {\n- std::string error;\n- std::vector<std::pair<Message, std::vector<Media>>> messagesVector;\n- try {\n- messagesVector =\n- DatabaseManager::getQueryExecutor().getAllMessages();\n- } catch (std::system_error &e) {\n- error = e.what();\n- }\n- auto messagesVectorPtr = std::make_shared<\n- std::vector<std::pair<Message, std::vector<Media>>>>(\n- std::move(messagesVector));\n- this->jsInvoker_->invokeAsync(\n- [messagesVectorPtr, &innerRt, promise, error]() {\n- if (error.size()) {\n- promise->reject(error);\n- return;\n- }\n- jsi::Array jsiMessages =\n- parseDBMessages(innerRt, messagesVectorPtr);\n- promise->resolve(std::move(jsiMessages));\n- });\n- };\n- GlobalDBSingleton::instance.scheduleOrRunCancellable(\n- job, promise, this->jsInvoker_);\n- });\n-}\n-\nconst std::string UPDATE_DRAFT_OPERATION = \"update\";\nconst std::string MOVE_DRAFT_OPERATION = \"move\";\nconst std::string REMOVE_ALL_DRAFTS_OPERATION = \"remove_all\";\n@@ -594,34 +535,6 @@ void CommCoreModule::processMessageStoreOperationsSync(\n});\n}\n-jsi::Value CommCoreModule::getAllThreads(jsi::Runtime &rt) {\n- return createPromiseAsJSIValue(\n- rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {\n- taskType job = [=, &innerRt]() {\n- std::string error;\n- std::vector<Thread> threadsVector;\n- try {\n- threadsVector = DatabaseManager::getQueryExecutor().getAllThreads();\n- } catch (std::system_error &e) {\n- error = e.what();\n- }\n- auto threadsVectorPtr =\n- std::make_shared<std::vector<Thread>>(std::move(threadsVector));\n- this->jsInvoker_->invokeAsync([=, &innerRt]() {\n- if (error.size()) {\n- promise->reject(error);\n- return;\n- }\n-\n- jsi::Array jsiThreads = parseDBThreads(innerRt, threadsVectorPtr);\n- promise->resolve(std::move(jsiThreads));\n- });\n- };\n- GlobalDBSingleton::instance.scheduleOrRunCancellable(\n- job, promise, this->jsInvoker_);\n- });\n-};\n-\njsi::Array CommCoreModule::getAllThreadsSync(jsi::Runtime &rt) {\nauto threadsVector = this->runSyncOrThrowJSError<std::vector<Thread>>(\nrt, []() { return DatabaseManager::getQueryExecutor().getAllThreads(); });\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -32,9 +32,7 @@ class CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\nconst jsi::String &oldKey,\nconst jsi::String &newKey) override;\njsi::Value getClientDBStore(jsi::Runtime &rt) override;\n- jsi::Value getAllDrafts(jsi::Runtime &rt) override;\njsi::Value removeAllDrafts(jsi::Runtime &rt) override;\n- jsi::Value getAllMessages(jsi::Runtime &rt) override;\njsi::Array getAllMessagesSync(jsi::Runtime &rt) override;\njsi::Value processDraftStoreOperations(\njsi::Runtime &rt,\n@@ -45,7 +43,6 @@ class CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\nvoid processMessageStoreOperationsSync(\njsi::Runtime &rt,\nconst jsi::Array &operations) override;\n- jsi::Value getAllThreads(jsi::Runtime &rt) override;\njsi::Array getAllThreadsSync(jsi::Runtime &rt) override;\njsi::Value processThreadStoreOperations(\njsi::Runtime &rt,\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/_generated/NativeModules.cpp", "new_path": "native/cpp/CommonCpp/_generated/NativeModules.cpp", "diff": "@@ -24,15 +24,9 @@ static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_moveDraft(jsi::R\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getClientDBStore(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getClientDBStore(rt);\n}\n-static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllDrafts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\n- return static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllDrafts(rt);\n-}\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_removeAllDrafts(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->removeAllDrafts(rt);\n}\n-static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\n- return static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllMessages(rt);\n-}\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllMessagesSync(rt);\n}\n@@ -46,9 +40,6 @@ static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageSt\nstatic_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->processMessageStoreOperationsSync(rt, args[0].getObject(rt).getArray(rt));\nreturn jsi::Value::undefined();\n}\n-static jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreads(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\n- return static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllThreads(rt);\n-}\nstatic jsi::Value __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreadsSync(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {\nreturn static_cast<CommCoreModuleSchemaCxxSpecJSI *>(&turboModule)->getAllThreadsSync(rt);\n}\n@@ -99,14 +90,11 @@ CommCoreModuleSchemaCxxSpecJSI::CommCoreModuleSchemaCxxSpecJSI(std::shared_ptr<C\nmethodMap_[\"updateDraft\"] = MethodMetadata {2, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_updateDraft};\nmethodMap_[\"moveDraft\"] = MethodMetadata {2, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_moveDraft};\nmethodMap_[\"getClientDBStore\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getClientDBStore};\n- methodMap_[\"getAllDrafts\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllDrafts};\nmethodMap_[\"removeAllDrafts\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_removeAllDrafts};\n- methodMap_[\"getAllMessages\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessages};\nmethodMap_[\"getAllMessagesSync\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllMessagesSync};\nmethodMap_[\"processDraftStoreOperations\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processDraftStoreOperations};\nmethodMap_[\"processMessageStoreOperations\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperations};\nmethodMap_[\"processMessageStoreOperationsSync\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processMessageStoreOperationsSync};\n- methodMap_[\"getAllThreads\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreads};\nmethodMap_[\"getAllThreadsSync\"] = MethodMetadata {0, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_getAllThreadsSync};\nmethodMap_[\"processThreadStoreOperations\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperations};\nmethodMap_[\"processThreadStoreOperationsSync\"] = MethodMetadata {1, __hostFunction_CommCoreModuleSchemaCxxSpecJSI_processThreadStoreOperationsSync};\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/_generated/NativeModules.h", "new_path": "native/cpp/CommonCpp/_generated/NativeModules.h", "diff": "@@ -22,14 +22,11 @@ virtual jsi::Value getDraft(jsi::Runtime &rt, const jsi::String &key) = 0;\nvirtual jsi::Value updateDraft(jsi::Runtime &rt, const jsi::String &key, const jsi::String &text) = 0;\nvirtual jsi::Value moveDraft(jsi::Runtime &rt, const jsi::String &oldKey, const jsi::String &newKey) = 0;\nvirtual jsi::Value getClientDBStore(jsi::Runtime &rt) = 0;\n-virtual jsi::Value getAllDrafts(jsi::Runtime &rt) = 0;\nvirtual jsi::Value removeAllDrafts(jsi::Runtime &rt) = 0;\n-virtual jsi::Value getAllMessages(jsi::Runtime &rt) = 0;\nvirtual jsi::Array getAllMessagesSync(jsi::Runtime &rt) = 0;\nvirtual jsi::Value processDraftStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual jsi::Value processMessageStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual void processMessageStoreOperationsSync(jsi::Runtime &rt, const jsi::Array &operations) = 0;\n-virtual jsi::Value getAllThreads(jsi::Runtime &rt) = 0;\nvirtual jsi::Array getAllThreadsSync(jsi::Runtime &rt) = 0;\nvirtual jsi::Value processThreadStoreOperations(jsi::Runtime &rt, const jsi::Array &operations) = 0;\nvirtual void processThreadStoreOperationsSync(jsi::Runtime &rt, const jsi::Array &operations) = 0;\n" }, { "change_type": "MODIFY", "old_path": "native/schema/CommCoreModuleSchema.js", "new_path": "native/schema/CommCoreModuleSchema.js", "diff": "@@ -29,9 +29,7 @@ export interface Spec extends TurboModule {\n+updateDraft: (key: string, text: string) => Promise<boolean>;\n+moveDraft: (oldKey: string, newKey: string) => Promise<boolean>;\n+getClientDBStore: () => Promise<ClientDBStore>;\n- +getAllDrafts: () => Promise<$ReadOnlyArray<ClientDBDraftInfo>>;\n+removeAllDrafts: () => Promise<void>;\n- +getAllMessages: () => Promise<$ReadOnlyArray<ClientDBMessageInfo>>;\n+getAllMessagesSync: () => $ReadOnlyArray<ClientDBMessageInfo>;\n+processDraftStoreOperations: (\noperations: $ReadOnlyArray<ClientDBDraftStoreOperation>,\n@@ -42,7 +40,6 @@ export interface Spec extends TurboModule {\n+processMessageStoreOperationsSync: (\noperations: $ReadOnlyArray<ClientDBMessageStoreOperation>,\n) => void;\n- +getAllThreads: () => Promise<$ReadOnlyArray<ClientDBThreadInfo>>;\n+getAllThreadsSync: () => $ReadOnlyArray<ClientDBThreadInfo>;\n+processThreadStoreOperations: (\noperations: $ReadOnlyArray<ClientDBThreadStoreOperation>,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Remove unecessary JSI queries Summary: This differential removes ol unecessary JSI queries to get all drafts, threads and messages. Test Plan: Removed queries are not used anymore in the project, so the sufficient test plan is to build the app. Reviewers: tomek, atul, jon Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5776
129,180
02.12.2022 11:49:22
-3,600
5f02014903916779ad8ddcb80aeb1107ddc0b17c
[web] Deleted unused file Summary: We don't use this file. We use color-selector instead. Deleted it and related css. Test Plan: Tested if app runs. Tested if color picking in thread works. Reviewers: tomek, kamil, atul Subscribers: ashoat, atul, kamil, tomek
[ { "change_type": "MODIFY", "old_path": "web/style.css", "new_path": "web/style.css", "diff": "@@ -193,43 +193,6 @@ span.page-error {\ncolor: red;\n}\n-div.color-picker-container {\n- outline: none;\n- position: relative;\n-}\n-div.color-picker-button {\n- margin: 6px 3px;\n- overflow: hidden;\n- cursor: pointer;\n- padding: 4px;\n- display: inline-block;\n- border: solid 1px darkgray;\n- background: #eee;\n- color: #333;\n- vertical-align: middle;\n- border-radius: 3px;\n-}\n-div.color-picker-preview {\n- width: 25px;\n- height: 16px;\n- border: solid 1px #222;\n- margin-right: 5px;\n- float: left;\n- z-index: 0;\n-}\n-div.color-picker-down-symbol {\n- padding: 1px 0;\n- height: 16px;\n- line-height: 16px;\n- float: left;\n- font-size: 10px;\n-}\n-div.color-picker-selector {\n- position: absolute;\n- left: 4px;\n- top: 34px;\n-}\n-\n@media only screen and (-webkit-min-device-pixel-ratio: 2),\nonly screen and (min--moz-device-pixel-ratio: 2),\nonly screen and (-o-min-device-pixel-ratio: 2/1),\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Deleted unused file Summary: We don't use this file. We use color-selector instead. Deleted it and related css. Test Plan: Tested if app runs. Tested if color picking in thread works. Reviewers: tomek, kamil, atul Reviewed By: tomek Subscribers: ashoat, atul, kamil, tomek Differential Revision: https://phab.comm.dev/D5800
129,184
06.12.2022 12:00:41
18,000
60bf0fd49af84bac751f6be3e2fbf8a2af6136f3
[native] `codeVersion` -> 163
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 162\n- versionName '1.0.162'\n+ versionCode 163\n+ versionName '1.0.163'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{162};\n+ const int codeVersion{163};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 162;\n+ CURRENT_PROJECT_VERSION = 163;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.162;\n+ MARKETING_VERSION = 1.0.163;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 162;\n+ CURRENT_PROJECT_VERSION = 163;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.162;\n+ MARKETING_VERSION = 1.0.163;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.162</string>\n+ <string>1.0.163</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>162</string>\n+ <string>163</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.162</string>\n+ <string>1.0.163</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>162</string>\n+ <string>163</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 163
129,184
06.12.2022 12:02:44
18,000
18c21e7ef7d164e7e9b33ec5490ee31d9938e35f
[native] `codeVersion` -> 164
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 163\n- versionName '1.0.163'\n+ versionCode 164\n+ versionName '1.0.164'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{163};\n+ const int codeVersion{164};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 163;\n+ CURRENT_PROJECT_VERSION = 164;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.163;\n+ MARKETING_VERSION = 1.0.164;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 163;\n+ CURRENT_PROJECT_VERSION = 164;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.163;\n+ MARKETING_VERSION = 1.0.164;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.163</string>\n+ <string>1.0.164</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>163</string>\n+ <string>164</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.163</string>\n+ <string>1.0.164</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>163</string>\n+ <string>164</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 164
129,178
07.12.2022 14:01:20
18,000
9eff6791baaf1a05c004ff841a2250112c7d7ffc
[lib] introduce SendReactionMessageRequest type to message types Summary: introduce `SendReactionMessageRequest` type to message types. This type will be needed in the `reactionMessageCreationResponder` Test Plan: `flow` and this will be further tested in subsequent diffs Reviewers: atul, rohan, tomek, ashoat Subscribers: ashoat, tomek, atul
[ { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -545,6 +545,13 @@ export type SendMultimediaMessageRequest =\n+mediaMessageContents: $ReadOnlyArray<MediaMessageServerDBContent>,\n};\n+export type SendReactionMessageRequest = {\n+ +threadID: string,\n+ +targetMessageID: string,\n+ +reaction: string,\n+ +action: 'add_reaction' | 'remove_reaction',\n+};\n+\n// Used for the message info included in log-in type actions\nexport type GenericMessagesResult = {\n+messageInfos: RawMessageInfo[],\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] introduce SendReactionMessageRequest type to message types Summary: introduce `SendReactionMessageRequest` type to message types. This type will be needed in the `reactionMessageCreationResponder` Test Plan: `flow` and this will be further tested in subsequent diffs Reviewers: atul, rohan, tomek, ashoat Reviewed By: atul, tomek, ashoat Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D5752
129,184
06.12.2022 13:29:28
18,000
1772c35ca17cfa2291dad3d78a6c99c4631985cb
[lib] Document why `ClientDBMessageInfo` uses strings everywhere Summary: Context: Should close Test Plan: NA Reviewers: tomek, marcin, varun, O6 Docs, ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -399,6 +399,16 @@ export type RemoveAllMessagesOperation = {\n+type: 'remove_all',\n};\n+// We were initially using `number`s` for `thread`, `type`, `future_type`, etc.\n+// However, we ended up changing `thread` to `string` to account for thread IDs\n+// including information about the keyserver (eg 'GENESIS|123') in the future.\n+//\n+// At that point we discussed whether we should switch the remaining `number`\n+// fields to `string`s for consistency and flexibility. We researched whether\n+// there was any performance cost to using `string`s instead of `number`s and\n+// found the differences to be negligible. We also concluded using `string`s\n+// may be safer after considering `jsi::Number` and the various C++ number\n+// representations on the CommCoreModule side.\nexport type ClientDBMessageInfo = {\n+id: string,\n+local_id: ?string,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Document why `ClientDBMessageInfo` uses strings everywhere Summary: Context: Should close https://linear.app/comm/issue/ENG-237/document-why-clientdbmessageinfo-uses-strings-everywhere Test Plan: NA Reviewers: tomek, marcin, varun, O6 Docs, ashoat Reviewed By: O6 Docs, ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5834
129,188
02.12.2022 12:50:52
-3,600
c389d36abeafe6c2b1ae2ed86646afa3468ea764
[keyserver] add viewer acknowledgment fetcher Summary: Function fetches viewer policies with `confirmed` value Test Plan: Check if returns proper value for one/multiple policies Reviewers: tomek, atul Subscribers: ashoat
[ { "change_type": "ADD", "old_path": null, "new_path": "keyserver/src/fetchers/policy-acknowledgment-fetchers.js", "diff": "+// @flow\n+\n+import type { PolicyType } from 'lib/facts/policies.js';\n+import { type UserPolicyConfirmationType } from 'lib/types/policy-types.js';\n+\n+import { dbQuery, SQL } from '../database/database.js';\n+import { Viewer } from '../session/viewer.js';\n+\n+async function fetchPolicyAcknowledgments(\n+ viewer: Viewer,\n+ policies: $ReadOnlyArray<PolicyType>,\n+): Promise<$ReadOnlyArray<UserPolicyConfirmationType>> {\n+ const query = SQL`\n+ SELECT policy, confirmed\n+ FROM policy_acknowledgments\n+ WHERE user=${viewer.id}\n+ AND policy IN (${policies})\n+ `;\n+ const [data] = await dbQuery(query);\n+ return data;\n+}\n+\n+export { fetchPolicyAcknowledgments };\n" }, { "change_type": "ADD", "old_path": null, "new_path": "lib/types/policy-types.js", "diff": "+// @flow\n+\n+import type { PolicyType } from '../facts/policies.js';\n+\n+export type UserPolicyConfirmationType = {\n+ +policy: PolicyType,\n+ +confirmed: boolean,\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] add viewer acknowledgment fetcher Summary: Function fetches viewer policies with `confirmed` value Test Plan: Check if returns proper value for one/multiple policies Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5822
129,184
13.12.2022 11:21:14
18,000
eae425b1d1959220fbe76be8fb5cd44225e19bdf
[landing] Update SIWE message to match whitepaper Summary: Context: {F283435} Test Plan: Before:{F283429} After:{F283430} Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -52,7 +52,10 @@ function createSiweMessage(address, statement) {\n}\nasync function signInWithEthereum(address, signer) {\n- const message = createSiweMessage(address, 'Sign in to Comm with Ethereum');\n+ const message = createSiweMessage(\n+ address,\n+ 'By continuing, I accept the Comm Terms of Service: https://comm.app/terms',\n+ );\nconst signature = await signer.signMessage(message);\nconst messageToPost = JSON.stringify({ address, message, signature });\nwindow.ReactNativeWebView?.postMessage?.(messageToPost);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Update SIWE message to match whitepaper Summary: Context: https://linear.app/comm/issue/ENG-2443/update-createsiwemessage-message-to-match-whitepaper {F283435} Test Plan: Before:{F283429} After:{F283430} Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D5862
129,184
15.12.2022 10:47:48
18,000
fb8059109e9eef474ffc7b4f781dd5a0abc74fb5
[native] `codeVersion` -> 165
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 164\n- versionName '1.0.164'\n+ versionCode 165\n+ versionName '1.0.165'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{164};\n+ const int codeVersion{165};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 164;\n+ CURRENT_PROJECT_VERSION = 165;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.164;\n+ MARKETING_VERSION = 1.0.165;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 164;\n+ CURRENT_PROJECT_VERSION = 165;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.164;\n+ MARKETING_VERSION = 1.0.165;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.164</string>\n+ <string>1.0.165</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>164</string>\n+ <string>165</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.164</string>\n+ <string>1.0.165</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>164</string>\n+ <string>165</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 165
129,184
15.12.2022 10:50:34
18,000
cc7d14a919e41f3bb69d465d3bccea8daafc07bc
[native] `codeVersion` -> 166
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -407,8 +407,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 165\n- versionName '1.0.165'\n+ versionCode 166\n+ versionName '1.0.166'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{165};\n+ const int codeVersion{166};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 165;\n+ CURRENT_PROJECT_VERSION = 166;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.165;\n+ MARKETING_VERSION = 1.0.166;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 165;\n+ CURRENT_PROJECT_VERSION = 166;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.165;\n+ MARKETING_VERSION = 1.0.166;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.165</string>\n+ <string>1.0.166</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>165</string>\n+ <string>166</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.165</string>\n+ <string>1.0.166</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>165</string>\n+ <string>166</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 166
129,196
02.12.2022 10:56:38
-3,600
e6f0993ea3d654823c7655154f392ade6518b3be
Remove CommRelease.entitlements reference from project.pbxproj Summary: This differential removes reference to non-existing CommRelease.entitlements file from project.pbxproj. Test Plan: Build debug and release version of the app after deleting CommRelease through XCode GUI (initially it should be visibile highlited in reed) Reviewers: tomek, atul Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "B7906F6C27209091009BBBF5 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = \"<group>\"; };\nB7E937CA26F448E700022A7C /* Media.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Media.h; sourceTree = \"<group>\"; };\nC562A7004903539402D988CE /* Pods-Comm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-Comm.release.xcconfig\"; path = \"Target Support Files/Pods-Comm/Pods-Comm.release.xcconfig\"; sourceTree = \"<group>\"; };\n- CB1648B027CFD07E00394D9D /* CommRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = CommRelease.entitlements; path = Comm/CommRelease.entitlements; sourceTree = \"<group>\"; };\nCB30C12327D0ACF700FBE8DE /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationService.entitlements; sourceTree = \"<group>\"; };\nCB38B4792877179A00171182 /* NonBlockingLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonBlockingLock.h; path = Comm/TemporaryMessageStorage/NonBlockingLock.h; sourceTree = \"<group>\"; };\nCB38B47B287718A200171182 /* NonBlockingLock.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = NonBlockingLock.mm; path = Comm/TemporaryMessageStorage/NonBlockingLock.mm; sourceTree = \"<group>\"; };\n13B07FAE1A68108700A75B9A /* Comm */ = {\nisa = PBXGroup;\nchildren = (\n- CB1648B027CFD07E00394D9D /* CommRelease.entitlements */,\n71B8CCB626BD30EC0040C0A2 /* CommCoreImplementations */,\n7F788C2B248AA2130098F071 /* SplashScreen.storyboard */,\n7FCFD8BD1E81B8DF00629B0E /* Comm.entitlements */,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Remove CommRelease.entitlements reference from project.pbxproj Summary: This differential removes reference to non-existing CommRelease.entitlements file from project.pbxproj. Test Plan: Build debug and release version of the app after deleting CommRelease through XCode GUI (initially it should be visibile highlited in reed) Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5799
129,201
19.12.2022 17:52:50
-3,600
4ddb4b60da6d1055d1ce0d658117b167c430c7c6
[docs] Removing deprecated gRPC codegen from the documentation Summary: This diff removes the deprecated gRPC codegen from the documentation. Linear task: [[ | ]] Test Plan: No tests, just docs. Reviewers: jon, tomek, ashoat Subscribers: ashoat, tomek, atul
[ { "change_type": "MODIFY", "old_path": "docs/nix_dev_env.md", "new_path": "docs/nix_dev_env.md", "diff": "@@ -100,7 +100,6 @@ Run `nix develop` to create a dev environment. Nix will handle the installation\n- [Inspect database with TablePlus](./nix_shared_workflows.md#inspect-database-with-tableplus)\n- [Codegen](./nix_shared_workflows.md#codegen)\n- [Codegen for JSI](./nix_shared_workflows.md#codegen-for-jsi)\n- - [Codegen for gRPC](./nix_shared_workflows.md#codegen-for-grpc)\n- [Working with Phabricator](./nix_shared_workflows.md#working-with-phabricator)\n- [Creating a new diff](./nix_shared_workflows.md#creating-a-new-diff)\n- [Updating a diff](./nix_shared_workflows.md#updating-a-diff)\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[docs] Removing deprecated gRPC codegen from the documentation Summary: This diff removes the deprecated gRPC codegen from the documentation. Linear task: [[ https://linear.app/comm/issue/ENG-2394/delete-codegen-for-grpc-from-docs | ENG-2394 ]] Test Plan: No tests, just docs. Reviewers: jon, tomek, ashoat Reviewed By: ashoat Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D5942
129,184
19.12.2022 11:32:48
28,800
0dfb8181dfc6186d6f9b5544f84e3071c6a44b89
[keyserver] Fix `siwe_nonces` table creation Summary: Very stupid issue I noticed when creating a new database. The stray comma at the end causes the following: {F293066} Test Plan: 1. Create a new DB 2. Run keyserver 3. Ensure that the script runs successfully. {F293079} Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "keyserver/src/database/setup-db.js", "new_path": "keyserver/src/database/setup-db.js", "diff": "@@ -243,7 +243,7 @@ async function createTables() {\nCREATE TABLE siwe_nonces (\nnonce char(17) NOT NULL,\n- creation_time bigint(20) NOT NULL,\n+ creation_time bigint(20) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\nALTER TABLE cookies\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Fix `siwe_nonces` table creation Summary: Very stupid issue I noticed when creating a new database. The stray comma at the end causes the following: {F293066} Test Plan: 1. Create a new DB 2. Run keyserver 3. Ensure that the script runs successfully. {F293079} Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D5943
129,187
08.11.2022 15:42:06
18,000
947d6dacdec93eab969833bd5c92a62c4495d4ca
[native] [8/40] RN 0.70: Ruby 2.7.5 Summary: This came from [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/?from=0.66.4&to=0.70.6) Depends on D5901 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul
[ { "change_type": "MODIFY", "old_path": "native/Gemfile", "new_path": "native/Gemfile", "diff": "source 'https://rubygems.org'\n# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version\n-ruby '~> 2.7.4'\n+ruby '~> 2.7.5'\ngem 'cocoapods', '~> 1.11', '>= 1.11.3'\n" }, { "change_type": "MODIFY", "old_path": "native/Gemfile.lock", "new_path": "native/Gemfile.lock", "diff": "@@ -94,7 +94,7 @@ DEPENDENCIES\ncocoapods (~> 1.11, >= 1.11.3)\nRUBY VERSION\n- ruby 2.7.4p191\n+ ruby 2.7.6p219\nBUNDLED WITH\n- 2.2.27\n+ 2.3.23\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [8/40] RN 0.70: Ruby 2.7.5 Summary: This came from [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/?from=0.66.4&to=0.70.6) Depends on D5901 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul Differential Revision: https://phab.comm.dev/D5902
129,187
03.11.2022 22:36:09
14,400
d28a0b1e4175a94601d4de38463ef333638c4cdd
[native] [9/40] RN 0.70: Update eslint to 7.32.0 Summary: [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/?from=0.66.4&to=0.70.6) suggested doing this. Depends on D5902 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul
[ { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"babel-eslint\": \"^10.1.0\",\n\"clang-format\": \"^1.8.0\",\n\"core-js\": \"^3.6.5\",\n- \"eslint\": \"^7.22.0\",\n+ \"eslint\": \"^7.32.0\",\n\"eslint-config-prettier\": \"^8.1.0\",\n\"eslint-plugin-flowtype\": \"^5.4.0\",\n\"eslint-plugin-import\": \"^2.22.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "resolved \"https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46\"\nintegrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==\n-\"@eslint/eslintrc@^0.4.2\":\n- version \"0.4.2\"\n- resolved \"https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179\"\n- integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==\n+\"@eslint/eslintrc@^0.4.3\":\n+ version \"0.4.3\"\n+ resolved \"https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c\"\n+ integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==\ndependencies:\najv \"^6.12.4\"\ndebug \"^4.1.1\"\n@@ -9206,13 +9206,13 @@ eslint-visitor-keys@^2.0.0:\nresolved \"https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303\"\nintegrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==\n-eslint@^7.22.0:\n- version \"7.30.0\"\n- resolved \"https://registry.yarnpkg.com/eslint/-/eslint-7.30.0.tgz#6d34ab51aaa56112fd97166226c9a97f505474f8\"\n- integrity sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg==\n+eslint@^7.32.0:\n+ version \"7.32.0\"\n+ resolved \"https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d\"\n+ integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==\ndependencies:\n\"@babel/code-frame\" \"7.12.11\"\n- \"@eslint/eslintrc\" \"^0.4.2\"\n+ \"@eslint/eslintrc\" \"^0.4.3\"\n\"@humanwhocodes/config-array\" \"^0.5.0\"\najv \"^6.10.0\"\nchalk \"^4.0.0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [9/40] RN 0.70: Update eslint to 7.32.0 Summary: [React Native Upgrade Helper](https://react-native-community.github.io/upgrade-helper/?from=0.66.4&to=0.70.6) suggested doing this. Depends on D5902 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul Differential Revision: https://phab.comm.dev/D5903
129,187
08.11.2022 15:40:45
18,000
7df23036ce3357aab898bcb293113b270ad2963c
[native] [12/40] RN 0.70: Update to Summary: Upgrade necessary due to [this issue](https://github.com/react-native-video/react-native-video/issues/2752) that occurs on React Native 0.69. Depends on D5905 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -315,9 +315,9 @@ PODS:\n- React-Core\n- react-native-safe-area-context (3.1.9):\n- React-Core\n- - react-native-video/Video (5.1.1):\n+ - react-native-video/Video (5.2.1):\n- React-Core\n- - react-native-video/VideoCaching (5.1.1):\n+ - react-native-video/VideoCaching (5.2.1):\n- DVAssetLoaderDelegate (~> 0.3.1)\n- React-Core\n- react-native-video/Video\n@@ -773,7 +773,7 @@ SPEC CHECKSUMS:\nreact-native-orientation-locker: 23918c400376a7043e752c639c122fcf6bce8f1c\nreact-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca\nreact-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94\n- react-native-video: 0bb76b6d6b77da3009611586c7dbf817b947f30e\n+ react-native-video: 10f689069cb894d75030190a9bc62d9393e1f997\nreact-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336\nReact-perflogger: 8c79399b0500a30ee8152d0f9f11beae7fc36595\nReact-RCTActionSheet: 7316773acabb374642b926c19aef1c115df5c466\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-native-svg\": \"^12.3.0\",\n\"react-native-tab-view\": \"^3.3.0\",\n\"react-native-vector-icons\": \"^6.6.0\",\n- \"react-native-video\": \"~5.1.1\",\n+ \"react-native-video\": \"^5.2.1\",\n\"react-native-webview\": \"^11.23.0\",\n\"react-redux\": \"^7.1.1\",\n\"reactotron-react-native\": \"^5.0.3\",\n" }, { "change_type": "MODIFY", "old_path": "native/react-native.config.js", "new_path": "native/react-native.config.js", "diff": "@@ -4,11 +4,5 @@ module.exports = {\ndependencies: {\n'react-native-firebase': { platforms: { ios: null } },\n'react-native-notifications': { platforms: { android: null } },\n- 'react-native-video': {\n- platforms: {\n- android: { sourceDir: '../node_modules/react-native-video/android' },\n- ios: null,\n- },\n- },\n},\n};\n" }, { "change_type": "ADD", "old_path": null, "new_path": "patches/react-native-video+5.2.1.patch", "diff": "+diff --git a/node_modules/react-native-video/react-native-video.podspec b/node_modules/react-native-video/react-native-video.podspec\n+index 7013f95..c9837e9 100644\n+--- a/node_modules/react-native-video/react-native-video.podspec\n++++ b/node_modules/react-native-video/react-native-video.podspec\n+@@ -10,7 +10,7 @@ Pod::Spec.new do |s|\n+ s.license = package['license']\n+ s.author = package['author']\n+ s.homepage = 'https://github.com/react-native-community/react-native-video'\n+- s.source = { :git => \"https://github.com/react-native-community/react-native-video.git\", :tag => \"#{s.version}\" }\n++ s.source = { :git => \"https://github.com/react-native-community/react-native-video.git\", :tag => \"v#{s.version}\" }\n+\n+ s.ios.deployment_target = \"8.0\"\n+ s.tvos.deployment_target = \"9.0\"\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "resolved \"https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e\"\nintegrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ==\n+\"@react-native/normalize-color@*\":\n+ version \"2.1.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.1.0.tgz#939b87a9849e81687d3640c5efa2a486ac266f91\"\n+ integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA==\n+\n\"@react-native/normalize-color@2.0.0\", \"@react-native/normalize-color@^2.0.0\":\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz#da955909432474a9a0fe1cbffc66576a0447f567\"\n@@ -8414,6 +8419,15 @@ depd@~2.0.0:\nresolved \"https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df\"\nintegrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==\n+deprecated-react-native-prop-types@^2.2.0:\n+ version \"2.3.0\"\n+ resolved \"https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz#c10c6ee75ff2b6de94bb127f142b814e6e08d9ab\"\n+ integrity sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA==\n+ dependencies:\n+ \"@react-native/normalize-color\" \"*\"\n+ invariant \"*\"\n+ prop-types \"*\"\n+\ndeprecation@^2.0.0, deprecation@^2.3.1:\nversion \"2.3.1\"\nresolved \"https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919\"\n@@ -11753,7 +11767,7 @@ interpret@^3.1.1:\nresolved \"https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4\"\nintegrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==\n-invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4:\n+invariant@*, invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4:\nversion \"2.2.4\"\nresolved \"https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6\"\nintegrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==\n@@ -16816,7 +16830,7 @@ prompts@^2.0.1, prompts@^2.4.0:\nkleur \"^3.0.3\"\nsisteransi \"^1.0.5\"\n-prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:\n+prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:\nversion \"15.8.1\"\nresolved \"https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5\"\nintegrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==\n@@ -17516,11 +17530,12 @@ react-native-vector-icons@^6.6.0:\nprop-types \"^15.6.2\"\nyargs \"^13.2.2\"\n-react-native-video@~5.1.1:\n- version \"5.1.1\"\n- resolved \"https://registry.yarnpkg.com/react-native-video/-/react-native-video-5.1.1.tgz#89a7989efeb8d404611c06154d1da227a745d7d8\"\n- integrity sha512-zee8gRUrjPWRoZSEBiMebClqu1iAuCQNLjzqpmXFrRWEoJj7azM3BPqLQWJgsnfLiYUYGySeApC/G60THM5+tw==\n+react-native-video@^5.2.1:\n+ version \"5.2.1\"\n+ resolved \"https://registry.yarnpkg.com/react-native-video/-/react-native-video-5.2.1.tgz#a17e856759d7e17eee9cbd9df0d05ba22e88d457\"\n+ integrity sha512-aJlr9MeTuQ0LpZ4n+EC9RvhoKeiPbLtI2Rxy8u7zo/wzGevbRpWHSBj9xZ5YDBXnAVXzuqyNIkGhdw7bfdIBZw==\ndependencies:\n+ deprecated-react-native-prop-types \"^2.2.0\"\nkeymirror \"^0.1.1\"\nprop-types \"^15.7.2\"\nshaka-player \"^2.5.9\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [12/40] RN 0.70: Update to react-native-video@5.2.1 Summary: Upgrade necessary due to [this issue](https://github.com/react-native-video/react-native-video/issues/2752) that occurs on React Native 0.69. Depends on D5905 Test Plan: Tested along with whole stack: [test plan](https://www.notion.so/commapp/Test-plan-for-React-Native-0-70-upgrade-718fa7e0fe4348099b4c169eb121da16) Reviewers: tomek, bartek Subscribers: atul Differential Revision: https://phab.comm.dev/D5906
129,187
20.12.2022 09:46:18
25,200
35e34f5439f3e26a1ba19742dbe15b3e177d46d4
[native] Unify margin for LoggedOutModal Summary: No point redefining this in a lot of places. Test Plan: Visual inspection looked good Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -592,8 +592,6 @@ const styles = StyleSheet.create({\nbackgroundColor: '#FFFFFFAA',\nborderRadius: 6,\nmarginBottom: 10,\n- marginLeft: 40,\n- marginRight: 40,\nmarginTop: 10,\npaddingBottom: 6,\npaddingLeft: 18,\n@@ -603,6 +601,8 @@ const styles = StyleSheet.create({\nbuttonContainer: {\nbottom: 0,\nleft: 0,\n+ marginLeft: 40,\n+ marginRight: 40,\npaddingBottom: 20,\nposition: 'absolute',\nright: 0,\n" }, { "change_type": "MODIFY", "old_path": "native/account/logged-out-staff-info.react.js", "new_path": "native/account/logged-out-staff-info.react.js", "diff": "@@ -98,8 +98,6 @@ const unboundStyles = {\nborderRadius: 6,\njustifyContent: 'flex-start',\nmarginBottom: 10,\n- marginLeft: 40,\n- marginRight: 40,\nmarginTop: 10,\npadding: 8,\n},\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Unify margin for LoggedOutModal Summary: No point redefining this in a lot of places. Test Plan: Visual inspection looked good Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D5954
129,187
20.12.2022 09:49:37
25,200
2ca00942d135bce285089d6884b91032da9a51a4
[native] Add "or" horizontal rule between SIWE and existing login Summary: Designs: Design task: Eng task: Test Plan: Visual inspection: {F295533} Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -5,7 +5,6 @@ import _isEqual from 'lodash/fp/isEqual';\nimport * as React from 'react';\nimport {\nView,\n- StyleSheet,\nText,\nTouchableOpacity,\nImage,\n@@ -41,6 +40,7 @@ import {\nderivedDimensionsInfoSelector,\n} from '../selectors/dimensions-selectors';\nimport { splashStyleSelector } from '../splash';\n+import { useStyles } from '../themes/colors';\nimport type { EventSubscription, KeyboardEvent } from '../types/react-native';\nimport type { ImageStyle } from '../types/styles';\nimport {\n@@ -113,6 +113,7 @@ type Props = {\n+loggedIn: boolean,\n+dimensions: DerivedDimensionsInfo,\n+splashStyle: ImageStyle,\n+ +styles: typeof unboundStyles,\n// Redux dispatch functions\n+dispatch: Dispatch,\n...\n@@ -450,11 +451,14 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n};\nrender() {\n+ const { styles } = this.props;\n+\nlet panel = null;\nlet buttons = null;\nlet siweButton = null;\nif (__DEV__) {\nsiweButton = (\n+ <>\n<TouchableOpacity\nonPress={this.onPressSIWE}\nstyle={styles.button}\n@@ -462,6 +466,12 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n>\n<Text style={styles.buttonText}>SIWE</Text>\n</TouchableOpacity>\n+ <View style={styles.siweOr}>\n+ <View style={styles.siweOrLeftHR} />\n+ <Text style={styles.siweOrText}>or</Text>\n+ <View style={styles.siweOrRightHR} />\n+ </View>\n+ </>\n);\n}\n@@ -580,7 +590,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n};\n}\n-const styles = StyleSheet.create({\n+const unboundStyles = {\nanimationContainer: {\nflex: 1,\n},\n@@ -635,7 +645,32 @@ const styles = StyleSheet.create({\nright: 0,\ntop: 0,\n},\n-});\n+ siweOr: {\n+ flex: 1,\n+ flexDirection: 'row',\n+ marginBottom: 18,\n+ marginTop: 14,\n+ },\n+ siweOrLeftHR: {\n+ borderColor: 'logInSpacer',\n+ borderTopWidth: 1,\n+ flex: 1,\n+ marginRight: 18,\n+ marginTop: 10,\n+ },\n+ siweOrRightHR: {\n+ borderColor: 'logInSpacer',\n+ borderTopWidth: 1,\n+ flex: 1,\n+ marginLeft: 18,\n+ marginTop: 10,\n+ },\n+ siweOrText: {\n+ color: 'logInText',\n+ fontSize: 17,\n+ textAlign: 'center',\n+ },\n+};\nconst isForegroundSelector = createIsForegroundSelector(\nLoggedOutModalRouteName,\n@@ -656,6 +691,7 @@ const ConnectedLoggedOutModal: React.ComponentType<{ ... }> = React.memo<{\nconst loggedIn = useSelector(isLoggedIn);\nconst dimensions = useSelector(derivedDimensionsInfoSelector);\nconst splashStyle = useSelector(splashStyleSelector);\n+ const styles = useStyles(unboundStyles);\nconst dispatch = useDispatch();\nreturn (\n@@ -669,6 +705,7 @@ const ConnectedLoggedOutModal: React.ComponentType<{ ... }> = React.memo<{\nloggedIn={loggedIn}\ndimensions={dimensions}\nsplashStyle={splashStyle}\n+ styles={styles}\ndispatch={dispatch}\n/>\n);\n" }, { "change_type": "MODIFY", "old_path": "native/themes/colors.js", "new_path": "native/themes/colors.js", "diff": "@@ -83,6 +83,8 @@ const light = Object.freeze({\nvibrantGreenButton: '#00C853',\nvibrantRedButton: '#F53100',\ntooltipBackground: '#E0E0E0',\n+ logInSpacer: '#FFFFFF33',\n+ logInText: 'white',\n});\nexport type Colors = $Exact<typeof light>;\n@@ -159,6 +161,8 @@ const dark: Colors = Object.freeze({\nvibrantGreenButton: '#00C853',\nvibrantRedButton: '#F53100',\ntooltipBackground: '#1F1F1F',\n+ logInSpacer: '#FFFFFF33',\n+ logInText: 'white',\n});\nconst colors = { light, dark };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Add "or" horizontal rule between SIWE and existing login Summary: Designs: https://www.figma.com/file/L675ETKDnGaSwlpZAw4MIC/Mobile-App?node-id=3531%3A51068&t=jPxFWIKYapZrvgr4-0 Design task: https://linear.app/comm/issue/DES-7/designs-for-siwe Eng task: https://linear.app/comm/issue/ENG-1815/ux-for-signing-a-message-on-native Test Plan: Visual inspection: {F295533} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D5955
129,187
20.12.2022 10:36:09
25,200
0c53bd135ea41e01fd746deda00b051fdb44aba9
[native] Style SIWE to match designs Summary: Designs: Design task: Eng task: Test Plan: Visual inspection: {F295535} Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -22,6 +22,7 @@ import { logInActionSources } from 'lib/types/account-types';\nimport type { Dispatch } from 'lib/types/redux-types';\nimport { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils';\n+import EthereumLogo from '../components/ethereum-logo.react.js';\nimport KeyboardAvoidingView from '../components/keyboard-avoiding-view.react';\nimport ConnectedStatusBar from '../connected-status-bar.react';\nimport {\n@@ -461,10 +462,15 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n<>\n<TouchableOpacity\nonPress={this.onPressSIWE}\n- style={styles.button}\n+ style={[styles.button, styles.siweButton]}\nactiveOpacity={0.6}\n>\n- <Text style={styles.buttonText}>SIWE</Text>\n+ <View style={styles.siweIcon}>\n+ <EthereumLogo />\n+ </View>\n+ <Text style={[styles.buttonText, styles.siweButtonText]}>\n+ Sign In with Ethereum\n+ </Text>\n</TouchableOpacity>\n<View style={styles.siweOr}>\n<View style={styles.siweOrLeftHR} />\n@@ -501,17 +507,21 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n{siweButton}\n<TouchableOpacity\nonPress={this.onPressLogIn}\n- style={styles.button}\n+ style={[styles.button, styles.classicAuthButton]}\nactiveOpacity={0.6}\n>\n- <Text style={styles.buttonText}>LOG IN</Text>\n+ <Text style={[styles.buttonText, styles.classicAuthButtonText]}>\n+ Sign in\n+ </Text>\n</TouchableOpacity>\n<TouchableOpacity\nonPress={this.onPressRegister}\n- style={styles.button}\n+ style={[styles.button, styles.classicAuthButton]}\nactiveOpacity={0.6}\n>\n- <Text style={styles.buttonText}>SIGN UP</Text>\n+ <Text style={[styles.buttonText, styles.classicAuthButtonText]}>\n+ Register\n+ </Text>\n</TouchableOpacity>\n</Animated.View>\n);\n@@ -599,30 +609,34 @@ const unboundStyles = {\ntop: 13,\n},\nbutton: {\n- backgroundColor: '#FFFFFFAA',\n- borderRadius: 6,\n- marginBottom: 10,\n- marginTop: 10,\n- paddingBottom: 6,\n+ borderRadius: 4,\n+ marginBottom: 4,\n+ marginTop: 4,\n+ paddingBottom: 14,\npaddingLeft: 18,\npaddingRight: 18,\n- paddingTop: 6,\n+ paddingTop: 14,\n},\nbuttonContainer: {\nbottom: 0,\nleft: 0,\n- marginLeft: 40,\n- marginRight: 40,\n+ marginLeft: 30,\n+ marginRight: 30,\npaddingBottom: 20,\nposition: 'absolute',\nright: 0,\n},\nbuttonText: {\n- color: '#000000FF',\nfontFamily: 'OpenSans-Semibold',\n- fontSize: 22,\n+ fontSize: 17,\ntextAlign: 'center',\n},\n+ classicAuthButton: {\n+ backgroundColor: 'purpleButton',\n+ },\n+ classicAuthButtonText: {\n+ color: 'logInText',\n+ },\ncontainer: {\nbackgroundColor: 'transparent',\nflex: 1,\n@@ -645,6 +659,15 @@ const unboundStyles = {\nright: 0,\ntop: 0,\n},\n+ siweButton: {\n+ backgroundColor: 'siweButton',\n+ flex: 1,\n+ flexDirection: 'row',\n+ justifyContent: 'center',\n+ },\n+ siweButtonText: {\n+ color: 'siweButtonText',\n+ },\nsiweOr: {\nflex: 1,\nflexDirection: 'row',\n@@ -670,6 +693,9 @@ const unboundStyles = {\nfontSize: 17,\ntextAlign: 'center',\n},\n+ siweIcon: {\n+ paddingRight: 10,\n+ },\n};\nconst isForegroundSelector = createIsForegroundSelector(\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/components/ethereum-logo.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import Svg, { Path } from 'react-native-svg';\n+\n+function EthereumLogo(): React.Node {\n+ return (\n+ <Svg\n+ width={16}\n+ height={26}\n+ viewBox=\"0 0 256 417\"\n+ xmlns=\"http://www.w3.org/2000/svg\"\n+ preserveAspectRatio=\"xMidYMid\"\n+ >\n+ <Path\n+ fill=\"#343434\"\n+ d=\"m127.961 0-2.795 9.5v275.668l2.795 2.79 127.962-75.638z\"\n+ />\n+ <Path fill=\"#8C8C8C\" d=\"M127.962 0 0 212.32l127.962 75.639V154.158z\" />\n+ <Path\n+ fill=\"#3C3C3B\"\n+ d=\"m127.961 312.187-1.575 1.92v98.199l1.575 4.6L256 236.587z\"\n+ />\n+ <Path fill=\"#8C8C8C\" d=\"M127.962 416.905v-104.72L0 236.585z\" />\n+ <Path fill=\"#141414\" d=\"m127.961 287.958 127.96-75.637-127.96-58.162z\" />\n+ <Path fill=\"#393939\" d=\"m0 212.32 127.96 75.638v-133.8z\" />\n+ </Svg>\n+ );\n+}\n+\n+export default EthereumLogo;\n" }, { "change_type": "MODIFY", "old_path": "native/themes/colors.js", "new_path": "native/themes/colors.js", "diff": "@@ -85,6 +85,8 @@ const light = Object.freeze({\ntooltipBackground: '#E0E0E0',\nlogInSpacer: '#FFFFFF33',\nlogInText: 'white',\n+ siweButton: 'white',\n+ siweButtonText: '#1F1F1F',\n});\nexport type Colors = $Exact<typeof light>;\n@@ -163,6 +165,8 @@ const dark: Colors = Object.freeze({\ntooltipBackground: '#1F1F1F',\nlogInSpacer: '#FFFFFF33',\nlogInText: 'white',\n+ siweButton: 'white',\n+ siweButtonText: '#1F1F1F',\n});\nconst colors = { light, dark };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Style SIWE to match designs Summary: Designs: https://www.figma.com/file/L675ETKDnGaSwlpZAw4MIC/Mobile-App?node-id=3531%3A51068&t=jPxFWIKYapZrvgr4-0 Design task: https://linear.app/comm/issue/DES-7/designs-for-siwe Eng task: https://linear.app/comm/issue/ENG-1815/ux-for-signing-a-message-on-native Test Plan: Visual inspection: {F295535} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D5956
129,184
21.12.2022 09:58:04
28,800
27305763347543a0fd430f91308f14bcc02a21b7
[lib] Add `GET_SIWE_NONCE_[STARTED/SUCCESS/FAILED]` to `redux-types` Summary: Should've added these when I introduced `lib/actions/siwe-actions.js:getSIWENonceActionTypes`. Ran into a flow issue when I was trying to use `createLoadingStatusSelector` which flagged that something was missing. Test Plan: Able to use `createLoadingStatusSelector` without issue later in the stack. Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -877,6 +877,22 @@ export type BaseAction =\n+error: true,\n+payload: Error,\n+loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'GET_SIWE_NONCE_STARTED',\n+ +payload?: void,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'GET_SIWE_NONCE_SUCCESS',\n+ +payload?: void,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'GET_SIWE_NONCE_FAILED',\n+ +error: true,\n+ +payload: Error,\n+ +loadingInfo: LoadingInfo,\n};\nexport type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Add `GET_SIWE_NONCE_[STARTED/SUCCESS/FAILED]` to `redux-types` Summary: Should've added these when I introduced `lib/actions/siwe-actions.js:getSIWENonceActionTypes`. Ran into a flow issue when I was trying to use `createLoadingStatusSelector` which flagged that something was missing. Test Plan: Able to use `createLoadingStatusSelector` without issue later in the stack. Reviewers: ashoat, tomek Reviewed By: tomek Differential Revision: https://phab.comm.dev/D5964
129,200
15.12.2022 14:34:27
18,000
5b7551fb565d0037d820ff49930747c897e5ad88
[keyserver] remove opaque-ke-node Summary: We're no longer using this addon so we can remove it from the repo Test Plan: Built keyserver successfully, checked that no references to this package remained Reviewers: ashoat Subscribers: ashoat, tomek
[ { "change_type": "DELETE", "old_path": "keyserver/addons/opaque-ke-node/.gitignore", "new_path": null, "diff": "-target\n-index.node\n-**/node_modules\n-**/.DS_Store\n-npm-debug.log*\n" }, { "change_type": "DELETE", "old_path": "keyserver/addons/opaque-ke-node/Cargo.lock", "new_path": null, "diff": "-# This file is automatically @generated by Cargo.\n-# It is not intended for manual editing.\n-version = 3\n-\n-[[package]]\n-name = \"argon2\"\n-version = \"0.3.4\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"25df3c03f1040d0069fcd3907e24e36d59f9b6fa07ba49be0eb25a794f036ba7\"\n-dependencies = [\n- \"base64ct\",\n- \"blake2\",\n- \"password-hash\",\n-]\n-\n-[[package]]\n-name = \"base64ct\"\n-version = \"1.0.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b\"\n-\n-[[package]]\n-name = \"blake2\"\n-version = \"0.10.5\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e\"\n-dependencies = [\n- \"digest 0.10.6\",\n-]\n-\n-[[package]]\n-name = \"block-buffer\"\n-version = \"0.9.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4\"\n-dependencies = [\n- \"generic-array\",\n-]\n-\n-[[package]]\n-name = \"block-buffer\"\n-version = \"0.10.3\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e\"\n-dependencies = [\n- \"generic-array\",\n-]\n-\n-[[package]]\n-name = \"byteorder\"\n-version = \"1.4.3\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610\"\n-\n-[[package]]\n-name = \"cfg-if\"\n-version = \"1.0.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd\"\n-\n-[[package]]\n-name = \"constant_time_eq\"\n-version = \"0.1.5\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc\"\n-\n-[[package]]\n-name = \"cpufeatures\"\n-version = \"0.2.5\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320\"\n-dependencies = [\n- \"libc\",\n-]\n-\n-[[package]]\n-name = \"crypto-common\"\n-version = \"0.1.6\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3\"\n-dependencies = [\n- \"generic-array\",\n- \"typenum\",\n-]\n-\n-[[package]]\n-name = \"crypto-mac\"\n-version = \"0.11.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714\"\n-dependencies = [\n- \"generic-array\",\n- \"subtle\",\n-]\n-\n-[[package]]\n-name = \"curve25519-dalek\"\n-version = \"3.2.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0\"\n-dependencies = [\n- \"byteorder\",\n- \"digest 0.9.0\",\n- \"rand_core 0.5.1\",\n- \"subtle\",\n- \"zeroize\",\n-]\n-\n-[[package]]\n-name = \"digest\"\n-version = \"0.9.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066\"\n-dependencies = [\n- \"generic-array\",\n-]\n-\n-[[package]]\n-name = \"digest\"\n-version = \"0.10.6\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f\"\n-dependencies = [\n- \"block-buffer 0.10.3\",\n- \"crypto-common\",\n- \"subtle\",\n-]\n-\n-[[package]]\n-name = \"displaydoc\"\n-version = \"0.2.3\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886\"\n-dependencies = [\n- \"proc-macro2\",\n- \"quote\",\n- \"syn\",\n-]\n-\n-[[package]]\n-name = \"generic-array\"\n-version = \"0.14.6\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9\"\n-dependencies = [\n- \"typenum\",\n- \"version_check\",\n-]\n-\n-[[package]]\n-name = \"getrandom\"\n-version = \"0.1.16\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce\"\n-dependencies = [\n- \"cfg-if\",\n- \"libc\",\n- \"wasi 0.9.0+wasi-snapshot-preview1\",\n-]\n-\n-[[package]]\n-name = \"getrandom\"\n-version = \"0.2.8\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31\"\n-dependencies = [\n- \"cfg-if\",\n- \"libc\",\n- \"wasi 0.11.0+wasi-snapshot-preview1\",\n-]\n-\n-[[package]]\n-name = \"hkdf\"\n-version = \"0.11.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b\"\n-dependencies = [\n- \"digest 0.9.0\",\n- \"hmac\",\n-]\n-\n-[[package]]\n-name = \"hmac\"\n-version = \"0.11.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b\"\n-dependencies = [\n- \"crypto-mac\",\n- \"digest 0.9.0\",\n-]\n-\n-[[package]]\n-name = \"libc\"\n-version = \"0.2.137\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89\"\n-\n-[[package]]\n-name = \"libloading\"\n-version = \"0.6.7\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883\"\n-dependencies = [\n- \"cfg-if\",\n- \"winapi\",\n-]\n-\n-[[package]]\n-name = \"neon\"\n-version = \"0.10.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"28e15415261d880aed48122e917a45e87bb82cf0260bb6db48bbab44b7464373\"\n-dependencies = [\n- \"neon-build\",\n- \"neon-macros\",\n- \"neon-runtime\",\n- \"semver\",\n- \"smallvec\",\n-]\n-\n-[[package]]\n-name = \"neon-build\"\n-version = \"0.10.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"8bac98a702e71804af3dacfde41edde4a16076a7bbe889ae61e56e18c5b1c811\"\n-\n-[[package]]\n-name = \"neon-macros\"\n-version = \"0.10.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"b7288eac8b54af7913c60e0eb0e2a7683020dffa342ab3fd15e28f035ba897cf\"\n-dependencies = [\n- \"quote\",\n- \"syn\",\n- \"syn-mid\",\n-]\n-\n-[[package]]\n-name = \"neon-runtime\"\n-version = \"0.10.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"4676720fa8bb32c64c3d9f49c47a47289239ec46b4bdb66d0913cc512cb0daca\"\n-dependencies = [\n- \"cfg-if\",\n- \"libloading\",\n- \"smallvec\",\n-]\n-\n-[[package]]\n-name = \"opaque-debug\"\n-version = \"0.3.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5\"\n-\n-[[package]]\n-name = \"opaque-ke\"\n-version = \"1.2.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"f25e5f1be61b7a94f388368a24739318fe4edd2b841d20d7077a422a5391e22f\"\n-dependencies = [\n- \"constant_time_eq\",\n- \"curve25519-dalek\",\n- \"digest 0.9.0\",\n- \"displaydoc\",\n- \"generic-array\",\n- \"hkdf\",\n- \"hmac\",\n- \"rand\",\n- \"subtle\",\n- \"zeroize\",\n-]\n-\n-[[package]]\n-name = \"opaque-ke-node\"\n-version = \"0.1.0\"\n-dependencies = [\n- \"argon2\",\n- \"curve25519-dalek\",\n- \"digest 0.9.0\",\n- \"neon\",\n- \"opaque-ke\",\n- \"rand\",\n- \"sha2\",\n-]\n-\n-[[package]]\n-name = \"password-hash\"\n-version = \"0.3.2\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8\"\n-dependencies = [\n- \"base64ct\",\n- \"rand_core 0.6.4\",\n- \"subtle\",\n-]\n-\n-[[package]]\n-name = \"ppv-lite86\"\n-version = \"0.2.17\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de\"\n-\n-[[package]]\n-name = \"proc-macro2\"\n-version = \"1.0.47\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725\"\n-dependencies = [\n- \"unicode-ident\",\n-]\n-\n-[[package]]\n-name = \"quote\"\n-version = \"1.0.21\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179\"\n-dependencies = [\n- \"proc-macro2\",\n-]\n-\n-[[package]]\n-name = \"rand\"\n-version = \"0.8.5\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404\"\n-dependencies = [\n- \"libc\",\n- \"rand_chacha\",\n- \"rand_core 0.6.4\",\n-]\n-\n-[[package]]\n-name = \"rand_chacha\"\n-version = \"0.3.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88\"\n-dependencies = [\n- \"ppv-lite86\",\n- \"rand_core 0.6.4\",\n-]\n-\n-[[package]]\n-name = \"rand_core\"\n-version = \"0.5.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19\"\n-dependencies = [\n- \"getrandom 0.1.16\",\n-]\n-\n-[[package]]\n-name = \"rand_core\"\n-version = \"0.6.4\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c\"\n-dependencies = [\n- \"getrandom 0.2.8\",\n-]\n-\n-[[package]]\n-name = \"semver\"\n-version = \"0.9.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403\"\n-dependencies = [\n- \"semver-parser\",\n-]\n-\n-[[package]]\n-name = \"semver-parser\"\n-version = \"0.7.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3\"\n-\n-[[package]]\n-name = \"sha2\"\n-version = \"0.9.9\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800\"\n-dependencies = [\n- \"block-buffer 0.9.0\",\n- \"cfg-if\",\n- \"cpufeatures\",\n- \"digest 0.9.0\",\n- \"opaque-debug\",\n-]\n-\n-[[package]]\n-name = \"smallvec\"\n-version = \"1.10.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0\"\n-\n-[[package]]\n-name = \"subtle\"\n-version = \"2.4.1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601\"\n-\n-[[package]]\n-name = \"syn\"\n-version = \"1.0.103\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d\"\n-dependencies = [\n- \"proc-macro2\",\n- \"quote\",\n- \"unicode-ident\",\n-]\n-\n-[[package]]\n-name = \"syn-mid\"\n-version = \"0.5.3\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9\"\n-dependencies = [\n- \"proc-macro2\",\n- \"quote\",\n- \"syn\",\n-]\n-\n-[[package]]\n-name = \"synstructure\"\n-version = \"0.12.6\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f\"\n-dependencies = [\n- \"proc-macro2\",\n- \"quote\",\n- \"syn\",\n- \"unicode-xid\",\n-]\n-\n-[[package]]\n-name = \"typenum\"\n-version = \"1.15.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987\"\n-\n-[[package]]\n-name = \"unicode-ident\"\n-version = \"1.0.5\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3\"\n-\n-[[package]]\n-name = \"unicode-xid\"\n-version = \"0.2.4\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c\"\n-\n-[[package]]\n-name = \"version_check\"\n-version = \"0.9.4\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f\"\n-\n-[[package]]\n-name = \"wasi\"\n-version = \"0.9.0+wasi-snapshot-preview1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519\"\n-\n-[[package]]\n-name = \"wasi\"\n-version = \"0.11.0+wasi-snapshot-preview1\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423\"\n-\n-[[package]]\n-name = \"winapi\"\n-version = \"0.3.9\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419\"\n-dependencies = [\n- \"winapi-i686-pc-windows-gnu\",\n- \"winapi-x86_64-pc-windows-gnu\",\n-]\n-\n-[[package]]\n-name = \"winapi-i686-pc-windows-gnu\"\n-version = \"0.4.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6\"\n-\n-[[package]]\n-name = \"winapi-x86_64-pc-windows-gnu\"\n-version = \"0.4.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f\"\n-\n-[[package]]\n-name = \"zeroize\"\n-version = \"1.3.0\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd\"\n-dependencies = [\n- \"zeroize_derive\",\n-]\n-\n-[[package]]\n-name = \"zeroize_derive\"\n-version = \"1.3.2\"\n-source = \"registry+https://github.com/rust-lang/crates.io-index\"\n-checksum = \"3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17\"\n-dependencies = [\n- \"proc-macro2\",\n- \"quote\",\n- \"syn\",\n- \"synstructure\",\n-]\n" }, { "change_type": "DELETE", "old_path": "keyserver/addons/opaque-ke-node/Cargo.toml", "new_path": null, "diff": "-[package]\n-name = \"opaque-ke-node\"\n-version = \"0.1.0\"\n-description = \"Exposes the opaque-ke Rust library to Node\"\n-license = \"BSD-3-Clause\"\n-edition = \"2021\"\n-exclude = [\"index.node\"]\n-\n-[lib]\n-crate-type = [\"cdylib\"]\n-\n-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html\n-\n-[dependencies]\n-argon2 = \"0.3\"\n-opaque-ke = \"1.2\"\n-curve25519-dalek = \"3.2\"\n-rand = \"0.8\"\n-sha2 = \"0.9\"\n-digest = \"0.9\"\n-\n-[dependencies.neon]\n-version = \"0.10\"\n-default-features = false\n-features = [\"napi-6\"]\n" }, { "change_type": "DELETE", "old_path": "keyserver/addons/opaque-ke-node/package.json", "new_path": null, "diff": "-{\n- \"name\": \"opaque-ke-node\",\n- \"version\": \"0.1.0\",\n- \"description\": \"Exposes the opaque-ke Rust library to Node\",\n- \"main\": \"index.node\",\n- \"scripts\": {\n- \"build\": \"cargo-cp-artifact -nc index.node -- cargo build --message-format=json-render-diagnostics\",\n- \"build-debug\": \"yarn build\",\n- \"build-release\": \"(yarn build --release || true)\",\n- \"install\": \"yarn build-release\",\n- \"test\": \"cargo test\"\n- },\n- \"author\": \"\",\n- \"license\": \"BSD-3-Clause\",\n- \"devDependencies\": {\n- \"cargo-cp-artifact\": \"^0.1\"\n- }\n-}\n" }, { "change_type": "DELETE", "old_path": "keyserver/addons/opaque-ke-node/src/lib.rs", "new_path": null, "diff": "-use argon2::Argon2;\n-use digest::generic_array::GenericArray;\n-use digest::Digest;\n-use neon::prelude::*;\n-use neon::types::buffer::TypedArray;\n-use opaque_ke::ciphersuite::CipherSuite;\n-use opaque_ke::errors::InternalPakeError;\n-use opaque_ke::hash::Hash;\n-use opaque_ke::slow_hash::SlowHash;\n-use opaque_ke::{\n- ClientLogin, ClientLoginFinishParameters, ClientLoginStartParameters,\n- ClientRegistration, ClientRegistrationFinishParameters,\n- CredentialFinalization, CredentialRequest, CredentialResponse,\n- RegistrationRequest, RegistrationResponse, RegistrationUpload,\n-};\n-use rand::rngs::OsRng;\n-\n-struct Cipher;\n-\n-impl CipherSuite for Cipher {\n- type Group = curve25519_dalek::ristretto::RistrettoPoint;\n- type KeyExchange = opaque_ke::key_exchange::tripledh::TripleDH;\n- type Hash = sha2::Sha512;\n- type SlowHash = ArgonWrapper;\n-}\n-\n-struct ArgonWrapper(Argon2<'static>);\n-\n-impl<D: Hash> SlowHash<D> for ArgonWrapper {\n- fn hash(\n- input: GenericArray<u8, <D as Digest>::OutputSize>,\n- ) -> Result<Vec<u8>, InternalPakeError> {\n- let params = Argon2::default();\n- let mut output = vec![0u8; <D as Digest>::output_size()];\n- params\n- .hash_password_into(&input, &[0; argon2::MIN_SALT_LEN], &mut output)\n- .map_err(|_| InternalPakeError::SlowHashError)?;\n- Ok(output)\n- }\n-}\n-\n-struct ClientRegistrationStartResult {\n- message: RegistrationRequest<Cipher>,\n- state: ClientRegistration<Cipher>,\n-}\n-\n-impl Finalize for ClientRegistrationStartResult {}\n-\n-struct ClientRegistrationFinishResult {\n- message: RegistrationUpload<Cipher>,\n-}\n-\n-impl Finalize for ClientRegistrationFinishResult {}\n-\n-struct ClientLoginStartResult {\n- message: CredentialRequest<Cipher>,\n- state: ClientLogin<Cipher>,\n-}\n-\n-impl Finalize for ClientLoginStartResult {}\n-\n-struct ClientLoginFinishResult {\n- message: CredentialFinalization<Cipher>,\n- session_key: Vec<u8>,\n-}\n-\n-impl Finalize for ClientLoginFinishResult {}\n-\n-fn client_register_start(\n- mut cx: FunctionContext,\n-) -> JsResult<JsBox<ClientRegistrationStartResult>> {\n- let password = cx.argument::<JsString>(0)?;\n- let mut client_rng = OsRng;\n- let client_registration_start_result = ClientRegistration::<Cipher>::start(\n- &mut client_rng,\n- password.value(&mut cx).as_bytes(),\n- )\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(cx.boxed(ClientRegistrationStartResult {\n- message: client_registration_start_result.message,\n- state: client_registration_start_result.state,\n- }))\n-}\n-\n-fn get_registration_start_message_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_registration_start_result =\n- cx.argument::<JsBox<ClientRegistrationStartResult>>(0)?;\n- Ok(JsArrayBuffer::external(\n- &mut cx,\n- client_registration_start_result.message.serialize(),\n- ))\n-}\n-\n-fn get_registration_start_state_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_registration_start_result =\n- cx.argument::<JsBox<ClientRegistrationStartResult>>(0)?;\n- Ok(JsArrayBuffer::external(\n- &mut cx,\n- client_registration_start_result.state.serialize(),\n- ))\n-}\n-\n-fn client_register_finish(\n- mut cx: FunctionContext,\n-) -> JsResult<JsBox<ClientRegistrationFinishResult>> {\n- let client_register_state = cx.argument::<JsTypedArray<u8>>(0)?;\n- let server_message = cx.argument::<JsTypedArray<u8>>(1)?;\n- let client_registration = ClientRegistration::<Cipher>::deserialize(\n- client_register_state.as_slice(&cx),\n- )\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- let registration_response =\n- RegistrationResponse::<Cipher>::deserialize(server_message.as_slice(&cx))\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n-\n- let mut client_rng = OsRng;\n- let client_registration_finish_result = ClientRegistrationFinishResult {\n- message: client_registration\n- .finish(\n- &mut client_rng,\n- registration_response,\n- ClientRegistrationFinishParameters::Default,\n- )\n- .or_else(|err| cx.throw_error(err.to_string()))?\n- .message,\n- };\n- Ok(cx.boxed(client_registration_finish_result))\n-}\n-\n-fn get_registration_finish_message_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_registration_finish_result =\n- cx.argument::<JsBox<ClientRegistrationFinishResult>>(0)?;\n- Ok(JsArrayBuffer::external(\n- &mut cx,\n- client_registration_finish_result.message.serialize(),\n- ))\n-}\n-\n-fn client_login_start(\n- mut cx: FunctionContext,\n-) -> JsResult<JsBox<ClientLoginStartResult>> {\n- let password = cx.argument::<JsString>(0)?;\n- let mut client_rng = OsRng;\n- let client_login = ClientLogin::<Cipher>::start(\n- &mut client_rng,\n- password.value(&mut cx).as_bytes(),\n- ClientLoginStartParameters::default(),\n- )\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(cx.boxed(ClientLoginStartResult {\n- message: client_login.message,\n- state: client_login.state,\n- }))\n-}\n-\n-fn get_login_start_message_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_login_start_result =\n- cx.argument::<JsBox<ClientLoginStartResult>>(0)?;\n- let login_start_message_vec =\n- client_login_start_result\n- .message\n- .serialize()\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(JsArrayBuffer::external(&mut cx, login_start_message_vec))\n-}\n-\n-fn get_login_start_state_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_login_start_result =\n- cx.argument::<JsBox<ClientLoginStartResult>>(0)?;\n- let login_start_message_vec = client_login_start_result\n- .state\n- .serialize()\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(JsArrayBuffer::external(&mut cx, login_start_message_vec))\n-}\n-\n-fn client_login_finish(\n- mut cx: FunctionContext,\n-) -> JsResult<JsBox<ClientLoginFinishResult>> {\n- let client_login_state = cx.argument::<JsTypedArray<u8>>(0)?;\n- let server_message = cx.argument::<JsTypedArray<u8>>(1)?;\n- let client_login =\n- ClientLogin::<Cipher>::deserialize(client_login_state.as_slice(&cx))\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- let credential_response =\n- CredentialResponse::<Cipher>::deserialize(server_message.as_slice(&cx))\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- let client_login_finish = client_login\n- .finish(credential_response, ClientLoginFinishParameters::default())\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(cx.boxed(ClientLoginFinishResult {\n- message: client_login_finish.message,\n- session_key: client_login_finish.session_key,\n- }))\n-}\n-\n-fn get_login_finish_message_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_login_finish_result =\n- cx.argument::<JsBox<ClientLoginFinishResult>>(0)?;\n- let login_finish_message_vec = client_login_finish_result\n- .message\n- .serialize()\n- .or_else(|err| cx.throw_error(err.to_string()))?;\n- Ok(JsArrayBuffer::external(&mut cx, login_finish_message_vec))\n-}\n-\n-fn get_login_finish_session_array(\n- mut cx: FunctionContext,\n-) -> JsResult<JsArrayBuffer> {\n- let client_login_finish_result =\n- cx.argument::<JsBox<ClientLoginFinishResult>>(0)?;\n- let login_finish_session_vec = client_login_finish_result.session_key.clone();\n- Ok(JsArrayBuffer::external(&mut cx, login_finish_session_vec))\n-}\n-\n-#[neon::main]\n-fn main(mut cx: ModuleContext) -> NeonResult<()> {\n- cx.export_function(\"clientRegisterStart\", client_register_start)?;\n- cx.export_function(\n- \"getRegistrationStartMessageArray\",\n- get_registration_start_message_array,\n- )?;\n- cx.export_function(\n- \"getRegistrationStartStateArray\",\n- get_registration_start_state_array,\n- )?;\n- cx.export_function(\"clientRegisterFinish\", client_register_finish)?;\n- cx.export_function(\n- \"getRegistrationFinishMessageArray\",\n- get_registration_finish_message_array,\n- )?;\n- cx.export_function(\"clientLoginStart\", client_login_start)?;\n- cx.export_function(\n- \"getLoginStartMessageArray\",\n- get_login_start_message_array,\n- )?;\n- cx.export_function(\"getLoginStartStateArray\", get_login_start_state_array)?;\n- cx.export_function(\"clientLoginFinish\", client_login_finish)?;\n- cx.export_function(\n- \"getLoginFinishMessageArray\",\n- get_login_finish_message_array,\n- )?;\n- cx.export_function(\n- \"getLoginFinishSessionArray\",\n- get_login_finish_session_array,\n- )?;\n- Ok(())\n-}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] remove opaque-ke-node Summary: We're no longer using this addon so we can remove it from the repo Test Plan: Built keyserver successfully, checked that no references to this package remained Reviewers: ashoat Reviewed By: ashoat Subscribers: ashoat, tomek Differential Revision: https://phab.comm.dev/D5879
129,178
21.12.2022 19:25:15
18,000
b8ff12417b3e151b8574a88427a4b70d261d3e62
[lib] set min code version for message liking Summary: set min code version for message liking to 167. Will rebase and adjust if a new build gets put out between now and landing this diff Test Plan: N/A Reviewers: atul, tomek Subscribers: ashoat, tomek, atul
[ { "change_type": "MODIFY", "old_path": "lib/shared/messages/reaction-message-spec.js", "new_path": "lib/shared/messages/reaction-message-spec.js", "diff": "@@ -138,8 +138,7 @@ export const reactionMessageSpec: MessageSpec<\nrawMessageInfo: RawReactionMessageInfo,\nplatformDetails: ?PlatformDetails,\n): RawReactionMessageInfo | RawUnsupportedMessageInfo {\n- // TODO: change minCodeVersion to correct number when ready\n- if (hasMinCodeVersion(platformDetails, 999)) {\n+ if (hasMinCodeVersion(platformDetails, 167)) {\nreturn rawMessageInfo;\n}\nconst { id } = rawMessageInfo;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] set min code version for message liking Summary: set min code version for message liking to 167. Will rebase and adjust if a new build gets put out between now and landing this diff Test Plan: N/A Reviewers: atul, tomek Reviewed By: atul Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D5920
129,187
21.12.2022 21:50:57
25,200
26f04572c8ec7fdfbd79c556dcf7c6615d9fc472
[native] Lowercase "in" in "Sign in with Ethereum" button Summary: Context [here](https://phab.comm.dev/D5956#inline-40373); also reference the [official SIWE assets](https://github.com/spruceid/siwe/tree/main/assets). Test Plan: I didn't test this at all actually Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -469,7 +469,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\n<EthereumLogo />\n</View>\n<Text style={[styles.buttonText, styles.siweButtonText]}>\n- Sign In with Ethereum\n+ Sign in with Ethereum\n</Text>\n</TouchableOpacity>\n<View style={styles.siweOr}>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Lowercase "in" in "Sign in with Ethereum" button Summary: Context [here](https://phab.comm.dev/D5956#inline-40373); also reference the [official SIWE assets](https://github.com/spruceid/siwe/tree/main/assets). Test Plan: I didn't test this at all actually Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D5986
129,187
21.12.2022 20:59:09
25,200
bd7f7f93fda07cc30b802f47171474c088b40e40
[keyserver] Fix JSONStream types Summary: No need to talk explicitly about `Promise`s here... ultimately it's a `mixed` type. Test Plan: Flow Reviewers: ginsu, michal, atul, tomek
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/website-responders.js", "new_path": "keyserver/src/responders/website-responders.js", "diff": "@@ -24,7 +24,6 @@ import { defaultNumberPerThread } from 'lib/types/message-types';\nimport { defaultEnabledReports } from 'lib/types/report-types';\nimport { defaultConnectionInfo } from 'lib/types/socket-types';\nimport { threadPermissions, threadTypes } from 'lib/types/thread-types';\n-import type { CurrentUserInfo } from 'lib/types/user-types';\nimport { currentDateInTimeZone } from 'lib/utils/date-utils';\nimport { ServerError } from 'lib/utils/errors';\nimport { promiseAll } from 'lib/utils/promises';\n@@ -309,10 +308,10 @@ async function websiteResponder(\nvar preloadedState =\n`);\n- const initialReduxState: any = await promiseAll({\n+ const initialReduxState = await promiseAll({\nnavInfo: navInfoPromise,\ndeviceID: null,\n- currentUserInfo: ((currentUserInfoPromise: any): Promise<CurrentUserInfo>),\n+ currentUserInfo: currentUserInfoPromise,\ndraftStore: { drafts: {} },\nsessionID: sessionIDPromise,\nentryStore: entryStorePromise,\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/utils/json-stream.js", "new_path": "keyserver/src/utils/json-stream.js", "diff": "@@ -5,10 +5,9 @@ import JSONStream from 'JSONStream';\nimport replaceStream from 'replacestream';\nimport Combine from 'stream-combiner';\n-type Promisable<T> = Promise<T> | T;\n-function streamJSON<T: { [key: string]: Promisable<*> }>(\n+function streamJSON(\nres: $Response,\n- input: T,\n+ input: { +[key: string]: mixed },\n): stream$Readable {\nconst jsonStream = Combine(\nJSONStream.stringifyObject('{', ',', '}'),\n@@ -19,9 +18,9 @@ function streamJSON<T: { [key: string]: Promisable<*> }>(\nreturn jsonStream;\n}\n-function resolvePromisesToStream<T: { [key: string]: Promisable<*> }>(\n+function resolvePromisesToStream(\nstream: { +write: ([string, mixed]) => mixed, +end: () => mixed, ... },\n- input: T,\n+ input: { +[key: string]: mixed },\n) {\nconst blocking = [];\nfor (const key in input) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Fix JSONStream types Summary: No need to talk explicitly about `Promise`s here... ultimately it's a `mixed` type. Test Plan: Flow Reviewers: ginsu, michal, atul, tomek Reviewed By: ginsu, michal, tomek Differential Revision: https://phab.comm.dev/D5982
129,187
22.12.2022 16:41:06
25,200
0199139921f83504c3d287917f1dde75b23284c9
[landing] Fix up CSS for RainbowKit / WalletConnect Summary: Hacky, but it works. Test Plan: | before | after | | {F302003} | {F302004} | | {F302005} | {F302006} | Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.css", "new_path": "landing/siwe.css", "diff": "@@ -24,9 +24,21 @@ body {\n}\n}\n+body > div > :global(div.iekbcc0) {\n+ word-break: initial;\n+}\nbody > div > :global(div.iekbcc0) > div {\nbottom: initial !important;\n}\nbody > div > :global(div.iekbcc0) > div > div > div > div {\nborder: 0 !important;\n}\n+\n+:global(div#walletconnect-wrapper) {\n+ word-break: initial;\n+ color: initial;\n+}\n+:global(div.walletconnect-modal__footer) {\n+ overflow: hidden;\n+ justify-content: flex-start;\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix up CSS for RainbowKit / WalletConnect Summary: Hacky, but it works. Test Plan: | before | after | | {F302003} | {F302004} | | {F302005} | {F302006} | Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6006
129,187
22.12.2022 16:56:47
25,200
98f40f9ff2244507f74b66272049b8eb9817f55c
[native] Wrap SIWEPanel WebView in BottomSheet Summary: This is gonna improve the UX a lot. See video in Test Plan (has a few later diffs as well). Test Plan: {F302078} Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "// @flow\n+import BottomSheet from '@gorhom/bottom-sheet';\nimport * as React from 'react';\n-import { ActivityIndicator, Text } from 'react-native';\n+import { ActivityIndicator, Text, View } from 'react-native';\nimport WebView from 'react-native-webview';\nimport {\n@@ -100,13 +101,71 @@ function SIWEPanel(): React.Node {\n[nonce],\n);\n- if (nonce) {\n- return <WebView source={source} onMessage={handleMessage} />;\n- } else if (getSIWENonceCallFailed) {\n- return <Text>Oops, try again later!</Text>;\n+ const [isLoading, setLoading] = React.useState(true);\n+\n+ const snapPoints = React.useMemo(() => {\n+ if (isLoading) {\n+ return [1];\n} else {\n- return <ActivityIndicator size=\"large\" />;\n+ return [700];\n}\n+ }, [isLoading]);\n+\n+ const onWebViewLoaded = React.useCallback(() => {\n+ setLoading(false);\n+ }, []);\n+\n+ const handleStyle = React.useMemo(\n+ () => ({\n+ backgroundColor: '#242529',\n+ }),\n+ [],\n+ );\n+\n+ const bottomSheetHandleIndicatorStyle = React.useMemo(\n+ () => ({\n+ backgroundColor: 'white',\n+ }),\n+ [],\n+ );\n+\n+ let bottomSheet;\n+ if (nonce) {\n+ bottomSheet = (\n+ <BottomSheet\n+ snapPoints={snapPoints}\n+ backgroundStyle={handleStyle}\n+ handleIndicatorStyle={bottomSheetHandleIndicatorStyle}\n+ >\n+ <WebView\n+ source={source}\n+ onMessage={handleMessage}\n+ onLoad={onWebViewLoaded}\n+ />\n+ </BottomSheet>\n+ );\n+ }\n+\n+ let activity;\n+ if (getSIWENonceCallFailed) {\n+ activity = <Text>Oops, try again later!</Text>;\n+ } else if (isLoading) {\n+ activity = <ActivityIndicator size=\"large\" />;\n+ }\n+\n+ const activityContainer = React.useMemo(\n+ () => ({\n+ flex: 1,\n+ }),\n+ [],\n+ );\n+\n+ return (\n+ <>\n+ <View style={activityContainer}>{activity}</View>\n+ {bottomSheet}\n+ </>\n+ );\n}\nexport default SIWEPanel;\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"@commapp/sqlcipher-amalgamation\": \"^4.4.3-a\",\n\"@expo/react-native-action-sheet\": \"^3.14.0\",\n\"@expo/vector-icons\": \"^13.0.0\",\n+ \"@gorhom/bottom-sheet\": \"^4.4.5\",\n\"@react-native-async-storage/async-storage\": \"^1.17.10\",\n\"@react-native-clipboard/clipboard\": \"^1.11.1\",\n\"@react-native-community/art\": \"^1.2.0\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "teeny-request \"^7.1.3\"\nxdg-basedir \"^4.0.0\"\n+\"@gorhom/bottom-sheet@^4.4.5\":\n+ version \"4.4.5\"\n+ resolved \"https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-4.4.5.tgz#b9041b01ce1af9a936e7c0fc1d78f026d759eebe\"\n+ integrity sha512-Z5Z20wshLUB8lIdtMKoJaRnjd64wBR/q8EeVPThrg+skrcBwBPHfUwZJ2srB0rEszA/01ejSJy/ixyd7Ra7vUA==\n+ dependencies:\n+ \"@gorhom/portal\" \"1.0.14\"\n+ invariant \"^2.2.4\"\n+\n+\"@gorhom/portal@1.0.14\":\n+ version \"1.0.14\"\n+ resolved \"https://registry.yarnpkg.com/@gorhom/portal/-/portal-1.0.14.tgz#1953edb76aaba80fb24021dc774550194a18e111\"\n+ integrity sha512-MXyL4xvCjmgaORr/rtryDNFy3kU4qUbKlwtQqqsygd0xX3mhKjOLn6mQK8wfu0RkoE0pBE0nAasRoHua+/QZ7A==\n+ dependencies:\n+ nanoid \"^3.3.1\"\n+\n\"@graphql-tools/merge@8.3.1\":\nversion \"8.3.1\"\nresolved \"https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.1.tgz#06121942ad28982a14635dbc87b5d488a041d722\"\n@@ -16426,6 +16441,11 @@ nanoid@^3.1.23:\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362\"\nintegrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==\n+nanoid@^3.3.1:\n+ version \"3.3.4\"\n+ resolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab\"\n+ integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==\n+\nnanomatch@^1.2.9:\nversion \"1.2.13\"\nresolved \"https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Wrap SIWEPanel WebView in BottomSheet Summary: This is gonna improve the UX a lot. See video in Test Plan (has a few later diffs as well). Test Plan: {F302078} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6007
129,187
22.12.2022 17:23:04
25,200
325524c5f4fe28cc53cf269f0439c54b51cb3b58
[native] Let the user dismiss the SIWEPanel with a gesture Summary: We need to make sure we trigger `goBackToPrompt` when the user dismisses the `BottomSheet`. Test Plan: Dismiss the `BottomSheet` and make sure `LoggedOutModal` goes back to the prompt Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -556,7 +556,7 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\nlet siwePanel;\nif (this.state.mode === 'siwe') {\n- siwePanel = <SIWEPanel />;\n+ siwePanel = <SIWEPanel onClose={this.goBackToPrompt} />;\n}\nconst backgroundSource = { uri: splashBackgroundURI };\n" }, { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "@@ -29,7 +29,10 @@ const getSIWENonceLoadingStatusSelector = createLoadingStatusSelector(\ngetSIWENonceActionTypes,\n);\n-function SIWEPanel(): React.Node {\n+type Props = {\n+ +onClose: () => mixed,\n+};\n+function SIWEPanel(props: Props): React.Node {\nconst navContext = React.useContext(NavContext);\nconst dispatchActionPromise = useDispatchActionPromise();\nconst registerAction = useServerCall(register);\n@@ -129,6 +132,16 @@ function SIWEPanel(): React.Node {\n[],\n);\n+ const { onClose } = props;\n+ const onBottomSheetChange = React.useCallback(\n+ (index: number) => {\n+ if (index === -1) {\n+ onClose();\n+ }\n+ },\n+ [onClose],\n+ );\n+\nlet bottomSheet;\nif (nonce) {\nbottomSheet = (\n@@ -136,6 +149,8 @@ function SIWEPanel(): React.Node {\nsnapPoints={snapPoints}\nbackgroundStyle={handleStyle}\nhandleIndicatorStyle={bottomSheetHandleIndicatorStyle}\n+ enablePanDownToClose={true}\n+ onChange={onBottomSheetChange}\n>\n<WebView\nsource={source}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Let the user dismiss the SIWEPanel with a gesture Summary: We need to make sure we trigger `goBackToPrompt` when the user dismisses the `BottomSheet`. Test Plan: Dismiss the `BottomSheet` and make sure `LoggedOutModal` goes back to the prompt Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6009
129,187
22.12.2022 17:47:18
25,200
e385ad79f9f3c288286c5c7365bae7ffa660b142
[landing] Disable RainbowKit slide-in animation Summary: Our `BottomSheet` is already sliding in; we don't need to do it twice. Test Plan: Load in desktop browser, Mobile Safari on Simulator, and within `WebView` in Comm app to verify slide-in effect is gone Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.css", "new_path": "landing/siwe.css", "diff": "@@ -27,6 +27,10 @@ body {\nbody > div > :global(div.iekbcc0) {\nword-break: initial;\n}\n+[data-rk] :global(._9pm4ki5) {\n+ animation: initial !important;\n+ -webkit-animation: initial !important;\n+}\nbody > div > :global(div.iekbcc0) > div {\nbottom: initial !important;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Disable RainbowKit slide-in animation Summary: Our `BottomSheet` is already sliding in; we don't need to do it twice. Test Plan: Load http://localhost:3000/commlanding/siwe in desktop browser, Mobile Safari on Simulator, and within `WebView` in Comm app to verify slide-in effect is gone Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6010
129,187
23.12.2022 07:38:06
25,200
e7344f3c3969ce2bf8ba2928e73c0de4caedbbcc
[native][landing] Type SIWEWebViewMessage Summary: Also added a `type` field in preparation for other types of messages which will need to be sent in future diffs. Test Plan: Flow Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -21,6 +21,8 @@ import {\n} from 'wagmi';\nimport { publicProvider } from 'wagmi/providers/public';\n+import type { SIWEWebViewMessage } from 'lib/types/siwe-types';\n+\nimport { SIWENonceContext } from './siwe-nonce-context.js';\nimport css from './siwe.css';\n@@ -57,6 +59,10 @@ function createSiweMessage(address: string, statement: string, nonce: string) {\nreturn message.prepareMessage();\n}\n+function postMessageToNativeWebView(message: SIWEWebViewMessage) {\n+ window.ReactNativeWebView?.postMessage?.(JSON.stringify(message));\n+}\n+\nasync function signInWithEthereum(address: string, signer, nonce: string) {\ninvariant(nonce, 'nonce must be present in signInWithEthereum');\nconst message = createSiweMessage(\n@@ -65,8 +71,12 @@ async function signInWithEthereum(address: string, signer, nonce: string) {\nnonce,\n);\nconst signature = await signer.signMessage(message);\n- const messageToPost = JSON.stringify({ address, message, signature });\n- window.ReactNativeWebView?.postMessage?.(messageToPost);\n+ postMessageToNativeWebView({\n+ type: 'siwe_success',\n+ address,\n+ message,\n+ signature,\n+ });\nreturn signature;\n}\n" }, { "change_type": "MODIFY", "old_path": "lib/types/siwe-types.js", "new_path": "lib/types/siwe-types.js", "diff": "export type SIWENonceResponse = {\n+nonce: string,\n};\n+\n+// This is a message that the rendered webpage (landing/siwe.react.js) uses to\n+// communicate back to the React Native WebView that is rendering it\n+// (native/account/siwe-panel.react.js)\n+export type SIWEWebViewMessage = {\n+ +type: 'siwe_success',\n+ +address: string,\n+ +message: string,\n+ +signature: string,\n+};\n" }, { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "@@ -12,6 +12,7 @@ import {\nimport { registerActionTypes, register } from 'lib/actions/user-actions';\nimport { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';\nimport type { LogInStartingPayload } from 'lib/types/account-types';\n+import type { SIWEWebViewMessage } from 'lib/types/siwe-types';\nimport {\nuseServerCall,\nuseDispatchActionPromise,\n@@ -83,13 +84,13 @@ function SIWEPanel(props: Props): React.Node {\n);\nconst handleMessage = React.useCallback(\nevent => {\n- const {\n- nativeEvent: { data },\n- } = event;\n- const { address, signature } = JSON.parse(data);\n+ const data: SIWEWebViewMessage = JSON.parse(event.nativeEvent.data);\n+ if (data.type === 'siwe_success') {\n+ const { address, signature } = data;\nif (address && signature) {\nhandleSIWE({ address, signature });\n}\n+ }\n},\n[handleSIWE],\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native][landing] Type SIWEWebViewMessage Summary: Also added a `type` field in preparation for other types of messages which will need to be sent in future diffs. Test Plan: Flow Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6011
129,187
23.12.2022 08:00:27
25,200
3913531270aacb806dbf23398b28749e8ef5154e
[native][landing] Close SIWEPanel when close button in WebView pressed Summary: We need to thread this event over to the `native` side. Test Plan: {F302752} Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -5,6 +5,7 @@ import {\ngetDefaultWallets,\nRainbowKitProvider,\ndarkTheme,\n+ useModalState,\n} from '@rainbow-me/rainbowkit';\nimport invariant from 'invariant';\nimport _merge from 'lodash/fp/merge';\n@@ -97,6 +98,16 @@ function SIWE(): React.Node {\n}\n}, [hasNonce, openConnectModal]);\n+ const prevConnectModalOpen = React.useRef(false);\n+ const modalState = useModalState();\n+ const { connectModalOpen } = modalState;\n+ React.useEffect(() => {\n+ if (!connectModalOpen && prevConnectModalOpen.current) {\n+ postMessageToNativeWebView({ type: 'siwe_closed' });\n+ }\n+ prevConnectModalOpen.current = connectModalOpen;\n+ }, [connectModalOpen]);\n+\nif (!hasNonce) {\nreturn (\n<div className={css.wrapper}>\n" }, { "change_type": "MODIFY", "old_path": "lib/types/siwe-types.js", "new_path": "lib/types/siwe-types.js", "diff": "@@ -7,9 +7,13 @@ export type SIWENonceResponse = {\n// This is a message that the rendered webpage (landing/siwe.react.js) uses to\n// communicate back to the React Native WebView that is rendering it\n// (native/account/siwe-panel.react.js)\n-export type SIWEWebViewMessage = {\n+export type SIWEWebViewMessage =\n+ | {\n+type: 'siwe_success',\n+address: string,\n+message: string,\n+signature: string,\n+ }\n+ | {\n+ +type: 'siwe_closed',\n};\n" }, { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "@@ -82,6 +82,9 @@ function SIWEPanel(props: Props): React.Node {\n},\n[logInExtraInfo, dispatchActionPromise, registerAction],\n);\n+ const bottomSheetRef = React.useRef();\n+ const closeBottomSheet = bottomSheetRef.current?.close;\n+ const { onClose } = props;\nconst handleMessage = React.useCallback(\nevent => {\nconst data: SIWEWebViewMessage = JSON.parse(event.nativeEvent.data);\n@@ -90,9 +93,12 @@ function SIWEPanel(props: Props): React.Node {\nif (address && signature) {\nhandleSIWE({ address, signature });\n}\n+ } else if (data.type === 'siwe_closed') {\n+ onClose();\n+ closeBottomSheet?.();\n}\n},\n- [handleSIWE],\n+ [handleSIWE, onClose, closeBottomSheet],\n);\nconst source = React.useMemo(\n@@ -133,7 +139,6 @@ function SIWEPanel(props: Props): React.Node {\n[],\n);\n- const { onClose } = props;\nconst onBottomSheetChange = React.useCallback(\n(index: number) => {\nif (index === -1) {\n@@ -152,6 +157,7 @@ function SIWEPanel(props: Props): React.Node {\nhandleIndicatorStyle={bottomSheetHandleIndicatorStyle}\nenablePanDownToClose={true}\nonChange={onBottomSheetChange}\n+ ref={bottomSheetRef}\n>\n<WebView\nsource={source}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "patches/@rainbow-me+rainbowkit+0.5.3.patch", "diff": "+diff --git a/node_modules/@rainbow-me/rainbowkit/dist/chunk-R7UVC5N6.js b/node_modules/@rainbow-me/rainbowkit/dist/chunk-R7UVC5N6.js\n+index 275c804..ca20931 100644\n+--- a/node_modules/@rainbow-me/rainbowkit/dist/chunk-R7UVC5N6.js\n++++ b/node_modules/@rainbow-me/rainbowkit/dist/chunk-R7UVC5N6.js\n+@@ -4590,5 +4590,6 @@ export {\n+ useAccountModal,\n+ useChainModal,\n+ useConnectModal,\n+- ConnectButton\n++ ConnectButton,\n++ useModalState,\n+ };\n+diff --git a/node_modules/@rainbow-me/rainbowkit/dist/index.js b/node_modules/@rainbow-me/rainbowkit/dist/index.js\n+index 8630ea1..a6fac1c 100644\n+--- a/node_modules/@rainbow-me/rainbowkit/dist/index.js\n++++ b/node_modules/@rainbow-me/rainbowkit/dist/index.js\n+@@ -22,7 +22,8 @@ import {\n+ useChainId,\n+ useChainModal,\n+ useConnectModal,\n+- useTransactionStore\n++ useTransactionStore,\n++ useModalState,\n+ } from \"./chunk-R7UVC5N6.js\";\n+ import {\n+ lightTheme\n+@@ -701,5 +702,6 @@ export {\n+ useAddRecentTransaction,\n+ useChainModal,\n+ useConnectModal,\n+- wallet\n++ wallet,\n++ useModalState,\n+ };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native][landing] Close SIWEPanel when close button in WebView pressed Summary: We need to thread this event over to the `native` side. Test Plan: {F302752} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6012
129,184
23.12.2022 13:21:11
28,800
bc2de1f864a53d31e7ce07dffddf79912c63f9dd
[native] `codeVersion` -> 167
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 166\n- versionName '1.0.166'\n+ versionCode 167\n+ versionName '1.0.167'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{166};\n+ const int codeVersion{167};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 166;\n+ CURRENT_PROJECT_VERSION = 167;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.166;\n+ MARKETING_VERSION = 1.0.167;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 166;\n+ CURRENT_PROJECT_VERSION = 167;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.166;\n+ MARKETING_VERSION = 1.0.167;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.166</string>\n+ <string>1.0.167</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>166</string>\n+ <string>167</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.166</string>\n+ <string>1.0.167</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>166</string>\n+ <string>167</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 167
129,184
23.12.2022 15:51:58
28,800
95d07a7696ddec752a07d8a40d5dedb684e87bc9
[native] `codeVersion` -> 168
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 167\n- versionName '1.0.167'\n+ versionCode 168\n+ versionName '1.0.168'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{167};\n+ const int codeVersion{168};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 167;\n+ CURRENT_PROJECT_VERSION = 168;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.167;\n+ MARKETING_VERSION = 1.0.168;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 167;\n+ CURRENT_PROJECT_VERSION = 168;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.167;\n+ MARKETING_VERSION = 1.0.168;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.167</string>\n+ <string>1.0.168</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>167</string>\n+ <string>168</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.167</string>\n+ <string>1.0.168</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>167</string>\n+ <string>168</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 168
129,187
23.12.2022 14:34:44
25,200
9234edae014b25a9e538d1a24cdad09470c5cbba
[native][landing] Resize BottomSheet when WalletConnect opened Summary: WalletConnect needs more space. See video. Test Plan: {F302863} Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -108,6 +108,42 @@ function SIWE(): React.Node {\nprevConnectModalOpen.current = connectModalOpen;\n}, [connectModalOpen]);\n+ const newModalAppeared = React.useCallback(mutationList => {\n+ for (const mutation of mutationList) {\n+ for (const addedNode of mutation.addedNodes) {\n+ if (\n+ addedNode instanceof HTMLElement &&\n+ addedNode.id === 'walletconnect-wrapper'\n+ ) {\n+ postMessageToNativeWebView({\n+ type: 'walletconnect_modal_update',\n+ state: 'open',\n+ });\n+ }\n+ }\n+ for (const addedNode of mutation.removedNodes) {\n+ if (\n+ addedNode instanceof HTMLElement &&\n+ addedNode.id === 'walletconnect-wrapper'\n+ ) {\n+ postMessageToNativeWebView({\n+ type: 'walletconnect_modal_update',\n+ state: 'closed',\n+ });\n+ }\n+ }\n+ }\n+ }, []);\n+\n+ React.useEffect(() => {\n+ const observer = new MutationObserver(newModalAppeared);\n+ invariant(document.body, 'document.body should be set');\n+ observer.observe(document.body, { childList: true });\n+ return () => {\n+ observer.disconnect();\n+ };\n+ }, [newModalAppeared]);\n+\nif (!hasNonce) {\nreturn (\n<div className={css.wrapper}>\n" }, { "change_type": "MODIFY", "old_path": "lib/types/siwe-types.js", "new_path": "lib/types/siwe-types.js", "diff": "@@ -16,4 +16,8 @@ export type SIWEWebViewMessage =\n}\n| {\n+type: 'siwe_closed',\n+ }\n+ | {\n+ +type: 'walletconnect_modal_update',\n+ +state: 'open' | 'closed',\n};\n" }, { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "import BottomSheet from '@gorhom/bottom-sheet';\nimport * as React from 'react';\nimport { ActivityIndicator, Text, View } from 'react-native';\n+import { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport WebView from 'react-native-webview';\nimport {\n@@ -64,6 +65,30 @@ function SIWEPanel(props: Props): React.Node {\n})();\n}, [dispatchActionPromise, getSIWENonceCall]);\n+ const [isLoading, setLoading] = React.useState(true);\n+ const [isWalletConnectModalOpen, setWalletConnectModalOpen] = React.useState(\n+ false,\n+ );\n+ const insets = useSafeAreaInsets();\n+ const bottomInset = insets.bottom;\n+ const snapPoints = React.useMemo(() => {\n+ if (isLoading) {\n+ return [1];\n+ } else if (isWalletConnectModalOpen) {\n+ return [bottomInset + 600];\n+ } else {\n+ return [bottomInset + 435, bottomInset + 600];\n+ }\n+ }, [isLoading, isWalletConnectModalOpen, bottomInset]);\n+\n+ const bottomSheetRef = React.useRef();\n+ const snapToIndex = bottomSheetRef.current?.snapToIndex;\n+ React.useEffect(() => {\n+ // When the snapPoints change, always reset to the first one\n+ // Without this, when we close the WalletConnect modal we don't resize\n+ snapToIndex?.(0);\n+ }, [snapToIndex, snapPoints]);\n+\nconst handleSIWE = React.useCallback(\n({ address, signature }) => {\n// this is all mocked from register-panel\n@@ -82,7 +107,6 @@ function SIWEPanel(props: Props): React.Node {\n},\n[logInExtraInfo, dispatchActionPromise, registerAction],\n);\n- const bottomSheetRef = React.useRef();\nconst closeBottomSheet = bottomSheetRef.current?.close;\nconst { onClose } = props;\nconst handleMessage = React.useCallback(\n@@ -96,6 +120,8 @@ function SIWEPanel(props: Props): React.Node {\n} else if (data.type === 'siwe_closed') {\nonClose();\ncloseBottomSheet?.();\n+ } else if (data.type === 'walletconnect_modal_update') {\n+ setWalletConnectModalOpen(data.state === 'open');\n}\n},\n[handleSIWE, onClose, closeBottomSheet],\n@@ -111,16 +137,6 @@ function SIWEPanel(props: Props): React.Node {\n[nonce],\n);\n- const [isLoading, setLoading] = React.useState(true);\n-\n- const snapPoints = React.useMemo(() => {\n- if (isLoading) {\n- return [1];\n- } else {\n- return [700];\n- }\n- }, [isLoading]);\n-\nconst onWebViewLoaded = React.useCallback(() => {\nsetLoading(false);\n}, []);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native][landing] Resize BottomSheet when WalletConnect opened Summary: WalletConnect needs more space. See video. Test Plan: {F302863} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6017
129,187
23.12.2022 15:56:49
25,200
fc8274f8598152541ab2b9ba5ef33067ee240838
[landing] Fix SIWE behavior when no wallet installed on Android Summary: Pulled this from [here](https://github.com/rainbow-me/rainbowkit/issues/892). Our patch is a little different because we're using an old version of Rainbowkit. Test Plan: Confirm links work when no wallet installed on Android emulator Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "patches/@rainbow-me+rainbowkit+0.5.3.patch", "new_path": "patches/@rainbow-me+rainbowkit+0.5.3.patch", "diff": "@@ -11,7 +11,7 @@ index 275c804..ca20931 100644\n+ useModalState,\n};\ndiff --git a/node_modules/@rainbow-me/rainbowkit/dist/index.js b/node_modules/@rainbow-me/rainbowkit/dist/index.js\n-index 8630ea1..a6fac1c 100644\n+index 8630ea1..230328e 100644\n--- a/node_modules/@rainbow-me/rainbowkit/dist/index.js\n+++ b/node_modules/@rainbow-me/rainbowkit/dist/index.js\n@@ -22,7 +22,8 @@ import {\n@@ -24,6 +24,33 @@ index 8630ea1..a6fac1c 100644\n} from \"./chunk-R7UVC5N6.js\";\nimport {\nlightTheme\n+@@ -336,7 +337,7 @@ var metaMask = ({\n+ });\n+ const getUri = async () => {\n+ const { uri } = (await connector.getProvider()).connector;\n+- return isAndroid() ? uri : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;\n++ return `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;\n+ };\n+ return {\n+ connector,\n+@@ -460,7 +461,7 @@ var rainbow = ({ chains }) => ({\n+ mobile: {\n+ getUri: async () => {\n+ const { uri } = (await connector.getProvider()).connector;\n+- return isAndroid() ? uri : `https://rnbwapp.com/wc?uri=${encodeURIComponent(uri)}`;\n++ return `https://rnbwapp.com/wc?uri=${encodeURIComponent(uri)}`;\n+ }\n+ },\n+ qrCode: {\n+@@ -564,7 +565,7 @@ var walletConnect = ({ chains }) => ({\n+ const getUri = async () => (await connector.getProvider()).connector.uri;\n+ return {\n+ connector,\n+- ...ios ? {} : {\n++ ...ios || isAndroid() ? {} : {\n+ mobile: { getUri },\n+ qrCode: { getUri }\n+ }\n@@ -701,5 +702,6 @@ export {\nuseAddRecentTransaction,\nuseChainModal,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix SIWE behavior when no wallet installed on Android Summary: Pulled this from [here](https://github.com/rainbow-me/rainbowkit/issues/892). Our patch is a little different because we're using an old version of Rainbowkit. Test Plan: Confirm links work when no wallet installed on Android emulator Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6018
129,187
23.12.2022 16:30:01
25,200
4930cf509f385847cb12d6f635e756eb732ee323
[native] Move Comm wordmark when SIWEPanel opened Summary: Should be the last visual diff on SIWE!! Test Plan: | iOS | Android | iOS with WalletConnect modal open | | {F303015} | {F303016} | {F303017} | Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/logged-out-modal.react.js", "new_path": "native/account/logged-out-modal.react.js", "diff": "@@ -328,12 +328,14 @@ class LoggedOutModal extends React.PureComponent<Props, State> {\nconst promptButtonsSize = Platform.OS === 'ios' ? 40 : 61;\nconst logInContainerSize = 140;\nconst registerPanelSize = Platform.OS === 'ios' ? 181 : 180;\n+ const siwePanelSize = 250;\nconst containerSize = add(\nheaderHeight,\ncond(not(isPastPrompt(this.modeValue)), promptButtonsSize, 0),\ncond(eq(this.modeValue, modeNumbers['log-in']), logInContainerSize, 0),\ncond(eq(this.modeValue, modeNumbers['register']), registerPanelSize, 0),\n+ cond(eq(this.modeValue, modeNumbers['siwe']), siwePanelSize, 0),\n);\nconst potentialPanelPaddingTop = divide(\nmax(sub(this.contentHeight, this.keyboardHeightValue, containerSize), 0),\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Move Comm wordmark when SIWEPanel opened Summary: Should be the last visual diff on SIWE!! Test Plan: | iOS | Android | iOS with WalletConnect modal open | | {F303015} | {F303016} | {F303017} | Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6020
129,184
26.12.2022 17:30:44
28,800
69d5979cfe057a0996ba62705f3d7b547652caad
[keyserver] Introduce basic scaffolding for `siwe_auth` endpoint Summary: Scaffolding to hit the `siwe_auth` endpoint from the `native` client. There's nothing interesting here. Test Plan: Able to hit endpoint from `native` client. Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "keyserver/src/endpoints.js", "new_path": "keyserver/src/endpoints.js", "diff": "@@ -52,6 +52,7 @@ import {\naccountDeletionResponder,\naccountCreationResponder,\nlogInResponder,\n+ siweAuthResponder,\noldPasswordUpdateResponder,\nupdateUserSettingsResponder,\npolicyAcknowledgmentResponder,\n@@ -234,6 +235,10 @@ const jsonEndpoints: { [id: Endpoint]: JSONResponder } = {\nresponder: siweNonceResponder,\nrequiredPolicies: [],\n},\n+ siwe_auth: {\n+ responder: siweAuthResponder,\n+ requiredPolicies: [],\n+ },\n};\nexport { jsonEndpoints };\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/responders/user-responders.js", "new_path": "keyserver/src/responders/user-responders.js", "diff": "@@ -293,6 +293,10 @@ async function logInResponder(\nreturn response;\n}\n+async function siweAuthResponder(): Promise<string> {\n+ return 'UNIMPLEMENTED';\n+}\n+\nconst updatePasswordRequestInputValidator = tShape({\ncode: t.String,\npassword: tPassword,\n@@ -357,6 +361,7 @@ export {\naccountDeletionResponder,\naccountCreationResponder,\nlogInResponder,\n+ siweAuthResponder,\noldPasswordUpdateResponder,\nupdateUserSettingsResponder,\npolicyAcknowledgmentResponder,\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/siwe-actions.js", "new_path": "lib/actions/siwe-actions.js", "diff": "@@ -14,4 +14,16 @@ const getSIWENonce = (\nreturn response.nonce;\n};\n-export { getSIWENonceActionTypes, getSIWENonce };\n+const siweAuthActionTypes = Object.freeze({\n+ started: 'SIWE_AUTH_STARTED',\n+ success: 'SIWE_AUTH_SUCCESS',\n+ failed: 'SIWE_AUTH_FAILED',\n+});\n+const siweAuth = (\n+ callServerEndpoint: CallServerEndpoint,\n+): (() => Promise<string>) => async () => {\n+ const response = await callServerEndpoint('siwe_auth');\n+ return response;\n+};\n+\n+export { getSIWENonceActionTypes, getSIWENonce, siweAuthActionTypes, siweAuth };\n" }, { "change_type": "MODIFY", "old_path": "lib/types/endpoints.js", "new_path": "lib/types/endpoints.js", "diff": "@@ -81,6 +81,7 @@ const socketPreferredEndpoints = Object.freeze({\nUPDATE_USER_SUBSCRIPTION: 'update_user_subscription',\nVERIFY_CODE: 'verify_code',\nSIWE_NONCE: 'siwe_nonce',\n+ SIWE_AUTH: 'siwe_auth',\n});\ntype SocketPreferredEndpoint = $Values<typeof socketPreferredEndpoints>;\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -893,6 +893,22 @@ export type BaseAction =\n+error: true,\n+payload: Error,\n+loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'SIWE_AUTH_STARTED',\n+ +payload?: void,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'SIWE_AUTH_SUCCESS',\n+ +payload?: void,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'SIWE_AUTH_FAILED',\n+ +error: true,\n+ +payload: Error,\n+ +loadingInfo: LoadingInfo,\n};\nexport type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Introduce basic scaffolding for `siwe_auth` endpoint Summary: Scaffolding to hit the `siwe_auth` endpoint from the `native` client. There's nothing interesting here. Test Plan: Able to hit endpoint from `native` client. Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6024
129,184
27.12.2022 00:45:51
28,800
b443a8224f540913f4ecec68ca33e21c8116ea7e
[lib] Introduce `SIWEMessage` type Summary: Effectively copied from the TypeScript types: {F304013} Will be helpful to type return value of `new SiweMessage(message)` in `siweAuthResponder` as `SIWEMessage`. Depends on D6029 Test Plan: Careful reading Reviewers: tomek, ashoat
[ { "change_type": "MODIFY", "old_path": "lib/types/siwe-types.js", "new_path": "lib/types/siwe-types.js", "diff": "@@ -43,3 +43,66 @@ export type SIWEWebViewMessage =\n+type: 'walletconnect_modal_update',\n+state: 'open' | 'closed',\n};\n+\n+export type SIWEMessage = {\n+ // RFC 4501 dns authority that is requesting the signing.\n+ +domain: string,\n+\n+ // Ethereum address performing the signing conformant to capitalization\n+ // encoded checksum specified in EIP-55 where applicable.\n+ +address: string,\n+\n+ // Human-readable ASCII assertion that the user will sign, and it must not\n+ // contain `\\n`.\n+ +statement?: string,\n+\n+ // RFC 3986 URI referring to the resource that is the subject of the signing\n+ // (as in the __subject__ of a claim).\n+ +uri: string,\n+\n+ // Current version of the message.\n+ +version: string,\n+\n+ // EIP-155 Chain ID to which the session is bound, and the network where\n+ // Contract Accounts must be resolved.\n+ +chainId: number,\n+\n+ // Randomized token used to prevent replay attacks, at least 8 alphanumeric\n+ // characters.\n+ +nonce: string,\n+\n+ // ISO 8601 datetime string of the current time.\n+ +issuedAt: string,\n+\n+ // ISO 8601 datetime string that, if present, indicates when the signed\n+ // authentication message is no longer valid.\n+ +expirationTime?: string,\n+\n+ // ISO 8601 datetime string that, if present, indicates when the signed\n+ // authentication message will become valid.\n+ +notBefore?: string,\n+\n+ // System-specific identifier that may be used to uniquely refer to the\n+ // sign-in request.\n+ +requestId?: string,\n+\n+ // List of information or references to information the user wishes to have\n+ // resolved as part of authentication by the relying party. They are\n+ // expressed as RFC 3986 URIs separated by `\\n- `.\n+ +resources?: $ReadOnlyArray<string>,\n+\n+ // @deprecated\n+ // Signature of the message signed by the wallet.\n+ //\n+ // This field will be removed in future releases, an additional parameter\n+ // was added to the validate function were the signature goes to validate\n+ // the message.\n+ +signature?: string,\n+\n+ // @deprecated\n+ // Type of sign message to be generated.\n+ //\n+ // This field will be removed in future releases and will rely on the\n+ // message version.\n+ +type?: 'Personal signature',\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Introduce `SIWEMessage` type Summary: Effectively copied from the TypeScript types: {F304013} Will be helpful to type return value of `new SiweMessage(message)` in `siweAuthResponder` as `SIWEMessage`. --- Depends on D6029 Test Plan: Careful reading Reviewers: tomek, ashoat Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6030
129,184
27.12.2022 02:39:58
28,800
af300d7ff131a6a46c9be0cbda8eb53605070e67
[native] `codeVersion` -> 169
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 168\n- versionName '1.0.168'\n+ versionCode 169\n+ versionName '1.0.169'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{168};\n+ const int codeVersion{169};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 168;\n+ CURRENT_PROJECT_VERSION = 169;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.168;\n+ MARKETING_VERSION = 1.0.169;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 168;\n+ CURRENT_PROJECT_VERSION = 169;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.168;\n+ MARKETING_VERSION = 1.0.169;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.168</string>\n+ <string>1.0.169</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>168</string>\n+ <string>169</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.168</string>\n+ <string>1.0.169</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>168</string>\n+ <string>169</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 169
129,184
27.12.2022 02:42:49
28,800
e81666dc452beae1137fa596608946d3d179ee97
[native] `codeVersion` -> 170
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 169\n- versionName '1.0.169'\n+ versionCode 170\n+ versionName '1.0.170'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{169};\n+ const int codeVersion{170};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 169;\n+ CURRENT_PROJECT_VERSION = 170;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.169;\n+ MARKETING_VERSION = 1.0.170;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 169;\n+ CURRENT_PROJECT_VERSION = 170;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.169;\n+ MARKETING_VERSION = 1.0.170;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.169</string>\n+ <string>1.0.170</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>169</string>\n+ <string>170</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.169</string>\n+ <string>1.0.170</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>169</string>\n+ <string>170</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 170
129,187
25.12.2022 19:37:52
25,200
2bdf04e88ab40d26ab854fa37e15331a4c552a68
[native] Set SIWE WebView background color Summary: This makes it so if the user overscrolls, they don't see white. Depends on D6034 Test Plan: Make sure overscroll isn't white Reviewers: atul Subscribers: tomek
[ { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "@@ -148,7 +148,7 @@ function SIWEPanel(props: Props): React.Node {\nsetLoading(false);\n}, []);\n- const handleStyle = React.useMemo(\n+ const backgroundStyle = React.useMemo(\n() => ({\nbackgroundColor: '#242529',\n}),\n@@ -176,7 +176,7 @@ function SIWEPanel(props: Props): React.Node {\nbottomSheet = (\n<BottomSheet\nsnapPoints={snapPoints}\n- backgroundStyle={handleStyle}\n+ backgroundStyle={backgroundStyle}\nhandleIndicatorStyle={bottomSheetHandleIndicatorStyle}\nenablePanDownToClose={true}\nonChange={onBottomSheetChange}\n@@ -186,6 +186,7 @@ function SIWEPanel(props: Props): React.Node {\nsource={source}\nonMessage={handleMessage}\nonLoad={onWebViewLoaded}\n+ style={backgroundStyle}\nincognito={true}\n/>\n</BottomSheet>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Set SIWE WebView background color Summary: This makes it so if the user overscrolls, they don't see white. Depends on D6034 Test Plan: Make sure overscroll isn't white Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6035
129,187
27.12.2022 18:49:42
25,200
a145b691bcbf9df3d91c0c2ea8b54934c50f712a
[landing] Style SIWE message signing step Summary: This addresses [ENG-2540](https://linear.app/comm/issue/ENG-2540/style-and-add-copy-for-second-step-of-siwe-on-native). Test Plan: {F306794} Reviewers: atul Subscribers: tomek
[ { "change_type": "DELETE", "old_path": "keyserver/images/ethereum_icon.svg", "new_path": null, "diff": "-<!-- sourced from https://login.xyz/ -->\n-<svg class=\"w-6 mr-4\" width=\"35\" height=\"58\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 35 58\" fill=\"none\">\n-<path d=\"M17.4954 0L17.1132 1.29889V38.9897L17.4954 39.3711L34.991 29.0295L17.4954 0Z\" fill=\"white\"></path><path d=\"M17.4956 0L0 29.0295L17.4956 39.3713V21.0773V0Z\" fill=\"white\"></path><path d=\"M17.494 42.6838L17.2786 42.9463V56.3726L17.494 57.0017L35 32.3474L17.494 42.6838Z\" fill=\"white\"></path><path d=\"M17.4956 57.0014V42.6835L0 32.3471L17.4956 57.0014Z\" fill=\"white\"></path><path d=\"M17.4965 39.3711L34.9919 29.0296L17.4965 21.0774V39.3711Z\" fill=\"white\"></path><path d=\"M0 29.0296L17.4954 39.3711V21.0774L0 29.0296Z\" fill=\"white\"></path>\n-</svg>\n" }, { "change_type": "MODIFY", "old_path": "landing/siwe.css", "new_path": "landing/siwe.css", "diff": "@@ -3,25 +3,41 @@ body {\nbackground: #242529 !important;\n}\n-.button {\n+.wrapper {\ndisplay: flex;\n- flex-direction: row;\n+ flex-wrap: wrap;\n+ flex-direction: column;\njustify-content: center;\nalign-items: center;\nalign-content: center;\n- background: #7e57c2;\n- box-shadow: -12px 20px 50px rgba(126, 87, 194, 0.5);\n- border-color: white;\n- border-width: 2px;\n- border-radius: 15px;\n- text-transform: uppercase;\n- padding: 10px;\n- width: 241px;\n+ padding-top: 20px;\n+ padding-bottom: 50px;\n+ color: white;\n+ font-family: sans-serif;\n+ padding: 20px;\n}\n-@media screen and (max-width: 400px) {\n- .button {\n- width: 140px;\n+.walletDisplay {\n+ display: flex;\n+ flex-direction: column;\n+ align-items: center;\n+ padding: 60px;\n}\n+.walletDisplayText {\n+ font-size: 24px;\n+ padding: 5px;\n+}\n+.wrapper > p {\n+ text-align: center;\n+ padding: 5px;\n+ font-size: 15px;\n+}\n+.button {\n+ margin-top: 20px;\n+ background: #7e57c2;\n+ border-radius: 4px;\n+ text-align: center;\n+ padding: 10px;\n+ width: 100%;\n}\n/* Classes from node_modules/@rainbow-me/rainbowkit/dist/components/index.css */\n" }, { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -6,6 +6,7 @@ import {\nRainbowKitProvider,\ndarkTheme,\nuseModalState,\n+ ConnectButton,\n} from '@rainbow-me/rainbowkit';\nimport invariant from 'invariant';\nimport _merge from 'lodash/fp/merge';\n@@ -150,9 +151,22 @@ function SIWE(): React.Node {\nreturn null;\n} else {\nreturn (\n+ <div className={css.wrapper}>\n+ <div className={css.walletDisplay}>\n+ <span className={css.walletDisplayText}>Wallet Connected:</span>\n+ <ConnectButton />\n+ </div>\n+ <p>\n+ To complete the login process, you&apos;ll now be asked to sign a\n+ message using your wallet.\n+ </p>\n+ <p>\n+ This signature will attest that your Ethereum identity is represented\n+ by your new Comm identity.\n+ </p>\n<div className={css.button} onClick={onClick}>\n- <img src=\"images/ethereum_icon.svg\" style={ethIconStyle} />\n- sign in\n+ Sign in\n+ </div>\n</div>\n);\n}\n@@ -179,6 +193,4 @@ function SIWEWrapper(): React.Node {\n);\n}\n-const ethIconStyle = { height: 25, paddingRight: 10 };\n-\nexport default SIWEWrapper;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Style SIWE message signing step Summary: This addresses [ENG-2540](https://linear.app/comm/issue/ENG-2540/style-and-add-copy-for-second-step-of-siwe-on-native). Test Plan: {F306794} Reviewers: atul Reviewed By: atul Subscribers: tomek Differential Revision: https://phab.comm.dev/D6058
129,188
28.12.2022 15:09:02
-3,600
4cc66894c62676640323452db1b48185b731b727
[native] display alert if register via SIWE fail Summary: Context in [ENG-2543](https://linear.app/comm/issue/ENG-2543/show-loading-icon-while-comm-account-being-registered-via-siwe) {F307601} Test Plan: Make sure keyserver will throw any error, register via SIWE, check if alert is visible and after click will navigate to login modal. Reviewers: tomek, atul, ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/account/siwe-panel.react.js", "new_path": "native/account/siwe-panel.react.js", "diff": "import BottomSheet from '@gorhom/bottom-sheet';\nimport * as React from 'react';\n-import { ActivityIndicator, Text, View } from 'react-native';\n+import { ActivityIndicator, Text, View, Alert } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport WebView from 'react-native-webview';\n@@ -97,24 +97,42 @@ function SIWEPanel(props: Props): React.Node {\nsnapToIndex?.(0);\n}, [snapToIndex, snapPoints]);\n+ const { onClose } = props;\n+ const callSIWE = React.useCallback(\n+ async (message, signature, extraInfo) => {\n+ try {\n+ return await siweAuthCall({\n+ message,\n+ signature,\n+ ...extraInfo,\n+ });\n+ } catch (e) {\n+ Alert.alert(\n+ 'Unknown error',\n+ 'Uhh... try again?',\n+ [{ text: 'OK', onPress: onClose }],\n+ { cancelable: false },\n+ );\n+ throw e;\n+ }\n+ },\n+ [onClose, siweAuthCall],\n+ );\n+\nconst handleSIWE = React.useCallback(\n({ message, signature }) => {\nconst extraInfo = logInExtraInfo();\ndispatchActionPromise(\nsiweAuthActionTypes,\n- siweAuthCall({\n- message,\n- signature,\n- ...extraInfo,\n- }),\n+ callSIWE(message, signature, extraInfo),\nundefined,\n({ calendarQuery: extraInfo.calendarQuery }: LogInStartingPayload),\n);\n},\n- [logInExtraInfo, dispatchActionPromise, siweAuthCall],\n+ [logInExtraInfo, dispatchActionPromise, callSIWE],\n);\nconst closeBottomSheet = bottomSheetRef.current?.close;\n- const { onClose, nextMode } = props;\n+ const { nextMode } = props;\nconst disableOnClose = React.useRef(false);\nconst handleMessage = React.useCallback(\nevent => {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] display alert if register via SIWE fail Summary: Context in [ENG-2543](https://linear.app/comm/issue/ENG-2543/show-loading-icon-while-comm-account-being-registered-via-siwe) {F307601} Test Plan: Make sure keyserver will throw any error, register via SIWE, check if alert is visible and after click will navigate to login modal. Reviewers: tomek, atul, ashoat Reviewed By: ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D6069
129,184
28.12.2022 15:19:14
28,800
c4844d9fde08368b6b1ae84ffa6ee48b7979e1e3
[keyserver] Remove payloads from `siweAuthResponder` `ServerError`s Summary: Context: Basically looks like these `status` payloads are superfluous and aren't used anywhere... so cutting them. Depends on D6060 Test Plan: Didn't really test... pretty confident this is a benign change. Reviewers: tomek, ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/user-responders.js", "new_path": "keyserver/src/responders/user-responders.js", "diff": "@@ -347,15 +347,15 @@ async function siweAuthResponder(\n} catch (error) {\nif (error === ErrorTypes.EXPIRED_MESSAGE) {\n// Thrown when the `expirationTime` is present and in the past.\n- throw new ServerError('expired_message', { status: 400 });\n+ throw new ServerError('expired_message');\n} else if (error === ErrorTypes.INVALID_SIGNATURE) {\n// Thrown when the `validate()` function can't verify the message.\n- throw new ServerError('invalid_signature', { status: 400 });\n+ throw new ServerError('invalid_signature');\n} else if (error === ErrorTypes.MALFORMED_SESSION) {\n// Thrown when some required field is missing.\n- throw new ServerError('malformed_session', { status: 400 });\n+ throw new ServerError('malformed_session');\n} else {\n- throw new ServerError('unknown_error', { status: 500 });\n+ throw new ServerError('unknown_error');\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Remove payloads from `siweAuthResponder` `ServerError`s Summary: Context: https://phab.comm.dev/D6033#181748 https://phab.comm.dev/D6033#181828 Basically looks like these `status` payloads are superfluous and aren't used anywhere... so cutting them. --- Depends on D6060 Test Plan: Didn't really test... pretty confident this is a benign change. Reviewers: tomek, ashoat Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6061
129,182
29.12.2022 18:09:05
-3,600
dea7c1849ff09a734defe8b65b97e3e1573cf2f4
[native] Add community drawer navigator Summary: Linear issue: Add a navigator for community drawer. Test Plan: Tested with subsequent diffs. Reviewers: tomek, atul, ginsu, kamil, bartek, ashoat Subscribers: ashoat
[ { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/community-drawer-navigator.react.js", "diff": "+// @flow\n+\n+import { createDrawerNavigator } from '@react-navigation/drawer';\n+import * as React from 'react';\n+import { Dimensions, View } from 'react-native';\n+\n+import { useStyles } from '../themes/colors';\n+import type { AppNavigationProp } from './app-navigator.react';\n+import CommunityDrawerContent from './community-drawer-content.react';\n+import { TabNavigatorRouteName } from './route-names';\n+import type { NavigationRoute } from './route-names';\n+import TabNavigator from './tab-navigator.react';\n+\n+const Drawer = createDrawerNavigator();\n+\n+const communityDrawerContent = () => <CommunityDrawerContent />;\n+\n+type Props = {\n+ +navigation: AppNavigationProp<'CommunityDrawerNavigator'>,\n+ +route: NavigationRoute<'CommunityDrawerNavigator'>,\n+};\n+\n+// eslint-disable-next-line no-unused-vars\n+function CommunityDrawerNavigator(props: Props): React.Node {\n+ const styles = useStyles(unboundStyles);\n+\n+ const screenOptions = React.useMemo(\n+ () => ({\n+ drawerStyle: styles.drawerStyle,\n+ }),\n+ [styles.drawerStyle],\n+ );\n+\n+ return (\n+ <View style={styles.drawerView}>\n+ <Drawer.Navigator\n+ screenOptions={screenOptions}\n+ drawerContent={communityDrawerContent}\n+ >\n+ <Drawer.Screen name={TabNavigatorRouteName} component={TabNavigator} />\n+ </Drawer.Navigator>\n+ </View>\n+ );\n+}\n+\n+const unboundStyles = {\n+ drawerView: {\n+ flex: 1,\n+ },\n+ drawerStyle: {\n+ width: Dimensions.get('window').width - 36,\n+ },\n+};\n+\n+export { CommunityDrawerNavigator };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Add community drawer navigator Summary: Linear issue: https://linear.app/comm/issue/ENG-1881/community-navigation-drawer-on-native Add a navigator for community drawer. Test Plan: Tested with subsequent diffs. Reviewers: tomek, atul, ginsu, kamil, bartek, ashoat Reviewed By: tomek, ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5732
129,184
29.12.2022 13:45:48
28,800
55ce736555876066bfa042024e6179245f0a3450
[lib] Modify `siweAuth(...)` return type from `LogInResponse` to `LogInResult` Summary: We construct `LogInResult` using the request payload (`SIWEAuthServerCall`) and the respond (`LogInResponse`). Code was effectively cut/paste from `lib/actions/user-actions:logIn`. Depends on D6077 Test Plan: Will be tested implicitly by subsequent diffs. Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "lib/actions/siwe-actions.js", "new_path": "lib/actions/siwe-actions.js", "diff": "// @flow\nimport threadWatcher from '../shared/thread-watcher.js';\n-import type { LogInResponse } from '../types/account-types.js';\n+import {\n+ type LogInResult,\n+ logInActionSources,\n+} from '../types/account-types.js';\nimport type { SIWEAuthServerCall } from '../types/siwe-types.js';\nimport type { CallServerEndpoint } from '../utils/call-server-endpoint';\nimport { getConfig } from '../utils/config.js';\n+import { mergeUserInfos } from './user-actions.js';\nconst getSIWENonceActionTypes = Object.freeze({\nstarted: 'GET_SIWE_NONCE_STARTED',\n@@ -28,7 +32,7 @@ const siweAuth = (\ncallServerEndpoint: CallServerEndpoint,\n): ((\nsiweAuthPayload: SIWEAuthServerCall,\n-) => Promise<LogInResponse>) => async siweAuthPayload => {\n+) => Promise<LogInResult>) => async siweAuthPayload => {\nconst watchedIDs = threadWatcher.getWatchedIDs();\nconst response = await callServerEndpoint(\n'siwe_auth',\n@@ -39,7 +43,27 @@ const siweAuth = (\n},\nsiweAuthCallServerEndpointOptions,\n);\n- return response;\n+ const userInfos = mergeUserInfos(\n+ response.userInfos,\n+ response.cookieChange.userInfos,\n+ );\n+ return {\n+ threadInfos: response.cookieChange.threadInfos,\n+ currentUserInfo: response.currentUserInfo,\n+ calendarResult: {\n+ calendarQuery: siweAuthPayload.calendarQuery,\n+ rawEntryInfos: response.rawEntryInfos,\n+ },\n+ messagesResult: {\n+ messageInfos: response.rawMessageInfos,\n+ truncationStatus: response.truncationStatuses,\n+ watchedIDsAtRequestTime: watchedIDs,\n+ currentAsOf: response.serverTime,\n+ },\n+ userInfos,\n+ updatesCurrentAsOf: response.serverTime,\n+ logInActionSource: logInActionSources.logInFromNativeSIWE,\n+ };\n};\nexport { getSIWENonceActionTypes, getSIWENonce, siweAuthActionTypes, siweAuth };\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/user-actions.js", "new_path": "lib/actions/user-actions.js", "diff": "@@ -242,6 +242,7 @@ export {\ndeleteAccount,\ndeleteAccountActionTypes,\ngetSessionPublicKeys,\n+ mergeUserInfos,\nlogIn,\nlogInActionTypes,\nlogOut,\n" }, { "change_type": "MODIFY", "old_path": "lib/types/account-types.js", "new_path": "lib/types/account-types.js", "diff": "@@ -86,6 +86,7 @@ export const logInActionSources = Object.freeze({\nsqliteLoadFailure: 'SQLITE_LOAD_FAILURE',\nlogInFromWebForm: 'LOG_IN_FROM_WEB_FORM',\nlogInFromNativeForm: 'LOG_IN_FROM_NATIVE_FORM',\n+ logInFromNativeSIWE: 'LOG_IN_FROM_NATIVE_SIWE',\n});\nexport type LogInActionSource = $Values<typeof logInActionSources>;\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -7,7 +7,6 @@ import type {\nLogInResult,\nRegisterResult,\nDefaultNotificationPayload,\n- LogInResponse,\n} from './account-types';\nimport type {\nActivityUpdateSuccessPayload,\n@@ -902,7 +901,7 @@ export type BaseAction =\n}\n| {\n+type: 'SIWE_AUTH_SUCCESS',\n- +payload: LogInResponse,\n+ +payload: LogInResult,\n+loadingInfo: LoadingInfo,\n}\n| {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Modify `siweAuth(...)` return type from `LogInResponse` to `LogInResult` Summary: We construct `LogInResult` using the request payload (`SIWEAuthServerCall`) and the respond (`LogInResponse`). Code was effectively cut/paste from `lib/actions/user-actions:logIn`. --- Depends on D6077 Test Plan: Will be tested implicitly by subsequent diffs. Reviewers: ashoat, tomek Reviewed By: ashoat, tomek Differential Revision: https://phab.comm.dev/D6085
129,196
29.12.2022 13:32:35
-3,600
5d99214912bcbf7ce5a08e46304e06ef1d6ca4f6
Soften requirement for password in account deletion request Summary: This differential softens requirement as to whether user should provide a password in account deletion request Test Plan: Launch the app. Reviewers: tomek, atul Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/user-responders.js", "new_path": "keyserver/src/responders/user-responders.js", "diff": "@@ -157,7 +157,7 @@ async function logOutResponder(viewer: Viewer): Promise<LogOutResponse> {\n}\nconst deleteAccountRequestInputValidator = tShape({\n- password: tPassword,\n+ password: t.maybe(tPassword),\n});\nasync function accountDeletionResponder(\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/user-actions.js", "new_path": "lib/actions/user-actions.js", "diff": "@@ -57,7 +57,7 @@ const deleteAccountActionTypes = Object.freeze({\nconst deleteAccount = (\ncallServerEndpoint: CallServerEndpoint,\n): ((\n- password: string,\n+ password: ?string,\npreRequestUserState: PreRequestUserState,\n) => Promise<LogOutResult>) => async (password, preRequestUserState) => {\nconst response = await callServerEndpoint('delete_account', { password });\n" }, { "change_type": "MODIFY", "old_path": "lib/types/account-types.js", "new_path": "lib/types/account-types.js", "diff": "@@ -72,7 +72,7 @@ export type RegisterResult = {\n};\nexport type DeleteAccountRequest = {\n- +password: string,\n+ +password: ?string,\n};\nexport const logInActionSources = Object.freeze({\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Soften requirement for password in account deletion request Summary: This differential softens requirement as to whether user should provide a password in account deletion request Test Plan: Launch the app. Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D6096
129,196
29.12.2022 15:43:36
-3,600
dc9bcf0e32b1b63b2eee7bc2c3b07bd63b9aa6ba
Soften requirements for password when deleting thread Summary: This differential makes account password an optional parameter of thread deletion request Test Plan: Build and lanynch the app Reviewers: tomek, atul Subscribers: ashoat, tomek, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/thread-responders.js", "new_path": "keyserver/src/responders/thread-responders.js", "diff": "@@ -43,7 +43,7 @@ import {\nconst threadDeletionRequestInputValidator = tShape({\nthreadID: t.String,\n- accountPassword: tPassword,\n+ accountPassword: t.maybe(tPassword),\n});\nasync function threadDeletionResponder(\n" }, { "change_type": "MODIFY", "old_path": "lib/actions/thread-actions.js", "new_path": "lib/actions/thread-actions.js", "diff": "@@ -23,7 +23,7 @@ const deleteThread = (\ncallServerEndpoint: CallServerEndpoint,\n): ((\nthreadID: string,\n- currentAccountPassword: string,\n+ currentAccountPassword: ?string,\n) => Promise<LeaveThreadPayload>) => async (\nthreadID,\ncurrentAccountPassword,\n" }, { "change_type": "MODIFY", "old_path": "lib/types/thread-types.js", "new_path": "lib/types/thread-types.js", "diff": "@@ -299,7 +299,7 @@ export type ClientDBThreadStoreOperation =\nexport type ThreadDeletionRequest = {\n+threadID: string,\n- +accountPassword: string,\n+ +accountPassword: ?string,\n};\nexport type RemoveMembersRequest = {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Soften requirements for password when deleting thread Summary: This differential makes account password an optional parameter of thread deletion request Test Plan: Build and lanynch the app Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D6101
129,191
28.12.2022 21:34:42
-3,600
273bd39da8a1f53b4b586fe6eff5fcc6e9841cb9
[web] Delete comments disabling eslint checks Summary: These comments were introduced during development of the feature and should've been deleted. Depends on D5852 Test Plan: Flow / eslint Reviewers: kamil, inka, ginsu, przemek, ashoat Subscribers: ashoat, atul
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-provider.js", "new_path": "web/chat/tooltip-provider.js", "diff": "@@ -40,17 +40,12 @@ type Props = {\n};\nfunction TooltipProvider(props: Props): React.Node {\nconst { children } = props;\n- // eslint-disable-next-line no-unused-vars\nconst tooltipSymbol = React.useRef<?symbol>(null);\n- // eslint-disable-next-line no-unused-vars\nconst tooltipCancelTimer = React.useRef<?TimeoutID>(null);\n- // eslint-disable-next-line no-unused-vars\nconst [tooltipNode, setTooltipNode] = React.useState<React.Node>(null);\nconst [\n- // eslint-disable-next-line no-unused-vars\ntooltipPosition,\n- // eslint-disable-next-line no-unused-vars\nsetTooltipPosition,\n] = React.useState<?TooltipPositionStyle>(null);\n@@ -98,14 +93,12 @@ function TooltipProvider(props: Props): React.Node {\n[clearTooltip],\n);\n- // eslint-disable-next-line no-unused-vars\nconst onMouseEnterTooltip = React.useCallback(() => {\nif (tooltipSymbol.current) {\nclearTimeout(tooltipCancelTimer.current);\n}\n}, []);\n- // eslint-disable-next-line no-unused-vars\nconst onMouseLeaveTooltip = React.useCallback(() => {\nconst timer = setTimeout(\nclearCurrentTooltip,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Delete comments disabling eslint checks Summary: These comments were introduced during development of the feature and should've been deleted. Depends on D5852 Test Plan: Flow / eslint Reviewers: kamil, inka, ginsu, przemek, ashoat Reviewed By: kamil, ashoat Subscribers: ashoat, atul Differential Revision: https://phab.comm.dev/D6074
129,184
30.12.2022 14:09:14
28,800
5cb48d5ae04306dd569c1f02ffd10f879d268df7
[native] `codeVersion` -> 171
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 170\n- versionName '1.0.170'\n+ versionCode 171\n+ versionName '1.0.171'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{170};\n+ const int codeVersion{171};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 170;\n+ CURRENT_PROJECT_VERSION = 171;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.170;\n+ MARKETING_VERSION = 1.0.171;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 170;\n+ CURRENT_PROJECT_VERSION = 171;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.170;\n+ MARKETING_VERSION = 1.0.171;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.170</string>\n+ <string>1.0.171</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>170</string>\n+ <string>171</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.170</string>\n+ <string>1.0.171</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>170</string>\n+ <string>171</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 171
129,184
30.12.2022 14:13:16
28,800
944eae83488700ca59b8790780a32c632bab2e7e
[native] `codeVersion` -> 172
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -471,8 +471,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 171\n- versionName '1.0.171'\n+ versionCode 172\n+ versionName '1.0.172'\nbuildConfigField \"boolean\", \"IS_NEW_ARCHITECTURE_ENABLED\", isNewArchitectureEnabled().toString()\nif (isNewArchitectureEnabled()) {\n// We configure the CMake build only if you decide to opt-in for the New Architecture.\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{171};\n+ const int codeVersion{172};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 171;\n+ CURRENT_PROJECT_VERSION = 172;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.171;\n+ MARKETING_VERSION = 1.0.172;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 171;\n+ CURRENT_PROJECT_VERSION = 172;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.171;\n+ MARKETING_VERSION = 1.0.172;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.171</string>\n+ <string>1.0.172</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>171</string>\n+ <string>172</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.171</string>\n+ <string>1.0.172</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>171</string>\n+ <string>172</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>rainbow</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 172
129,184
30.12.2022 18:00:48
28,800
423fcb8e9658b8ce0665e78d074ae87b7770b9c7
[lib] Introduce `isValidPrimaryIdentityPublicKey` Summary: Going to use this in `landing-handler` to validate `siwe-primary-identity-public-key` header value before "injecting" into page. Depends on D6124 Test Plan: unit tests Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.js", "new_path": "lib/utils/siwe-utils.js", "diff": "@@ -13,6 +13,11 @@ function isValidEthereumAddress(candidate: string): boolean {\nreturn ethereumAddressRegex.test(candidate);\n}\n+const primaryIdentityPublicKeyRegex: RegExp = /^[a-zA-Z0-9+/]{43}$/;\n+function isValidPrimaryIdentityPublicKey(candidate: string): boolean {\n+ return primaryIdentityPublicKeyRegex.test(candidate);\n+}\n+\nconst siweStatement: string =\n'By continuing, I accept the Comm Terms of Service: https://comm.app/terms';\n@@ -36,5 +41,6 @@ export {\nsiweStatement,\nisValidSIWENonce,\nisValidEthereumAddress,\n+ isValidPrimaryIdentityPublicKey,\nisValidSIWEMessage,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.test.js", "new_path": "lib/utils/siwe-utils.test.js", "diff": "// @flow\n-import { isValidEthereumAddress, isValidSIWENonce } from './siwe-utils.js';\n+import {\n+ isValidEthereumAddress,\n+ isValidPrimaryIdentityPublicKey,\n+ isValidSIWENonce,\n+} from './siwe-utils.js';\ndescribe('SIWE Nonce utils', () => {\nit('isValidSIWENonce should match valid nonces', () => {\n@@ -153,4 +157,22 @@ describe('SIWE Nonce utils', () => {\nconst invalidAddress = 'e523fc253bcdea8373e030ee66e00c6864776d70';\nexpect(isValidEthereumAddress(invalidAddress)).toBe(false);\n});\n+\n+ it(`isValidPrimaryIdentityPublicKey should succeed for valid ed25519 keys`, () => {\n+ const validPublicKey = 'rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4UaYccJYdo';\n+ expect(isValidPrimaryIdentityPublicKey(validPublicKey)).toBe(true);\n+\n+ const anotherValidPublicKey = '98+/eB2MUVvYCpkESOS1zuWnWttsYWDKeDXl8T3o8LY';\n+ expect(isValidPrimaryIdentityPublicKey(anotherValidPublicKey)).toBe(true);\n+ });\n+\n+ it(`isValidPrimaryIdentityPublicKey should fail for keys < 43 chars`, () => {\n+ const shortPublicKey = 'rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4JYdo';\n+ expect(isValidPrimaryIdentityPublicKey(shortPublicKey)).toBe(false);\n+ });\n+\n+ it(`isValidPrimaryIdentityPublicKey should fail for keys > 43 chars`, () => {\n+ const longPublicKey = '98+/eB2MUVvYCpkESOSWttsYWDKeDXl8TAAAAAAAAAA3o8LY';\n+ expect(isValidPrimaryIdentityPublicKey(longPublicKey)).toBe(false);\n+ });\n});\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Introduce `isValidPrimaryIdentityPublicKey` Summary: Going to use this in `landing-handler` to validate `siwe-primary-identity-public-key` header value before "injecting" into page. --- Depends on D6124 Test Plan: unit tests Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6125
129,184
03.01.2023 13:34:48
28,800
3142750b0b853ea49771b2c3fd5dbae99553fcb1
[lib] Introduce `getSIWEStatementForPublicKey(...)` Summary: Given a public key, `getSIWEStatementForPublicKey(...)` generates a statement for SIWE message that conforms to what is described in the whitepaper: Depends on D6128 Test Plan: included a unit test Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.js", "new_path": "lib/utils/siwe-utils.js", "diff": "// @flow\n+import invariant from 'invariant';\n+\nimport type { SIWEMessage } from '../types/siwe-types.js';\nimport { isDev } from './dev-utils.js';\n@@ -37,10 +39,19 @@ function isValidSIWEMessage(candidate: SIWEMessage): boolean {\n);\n}\n+function getSIWEStatementForPublicKey(publicKey: string): string {\n+ invariant(\n+ isValidPrimaryIdentityPublicKey(publicKey),\n+ 'publicKey must be well formed in getSIWEStatementForPublicKey',\n+ );\n+ return `Device IdPubKey: ${publicKey} ${siweStatement}`;\n+}\n+\nexport {\nsiweStatement,\nisValidSIWENonce,\nisValidEthereumAddress,\nisValidPrimaryIdentityPublicKey,\nisValidSIWEMessage,\n+ getSIWEStatementForPublicKey,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.test.js", "new_path": "lib/utils/siwe-utils.test.js", "diff": "// @flow\nimport {\n+ getSIWEStatementForPublicKey,\nisValidEthereumAddress,\nisValidPrimaryIdentityPublicKey,\nisValidSIWENonce,\n@@ -175,4 +176,14 @@ describe('SIWE Nonce utils', () => {\nconst longPublicKey = '98+/eB2MUVvYCpkESOSWttsYWDKeDXl8TAAAAAAAAAA3o8LY';\nexpect(isValidPrimaryIdentityPublicKey(longPublicKey)).toBe(false);\n});\n+\n+ it(`getSIWEStatementForPublicKey should generate expected statement`, () => {\n+ const validPublicKey = 'rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4UaYccJYdo';\n+ const expectedString =\n+ `Device IdPubKey: rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4UaYccJYdo ` +\n+ `By continuing, I accept the Comm Terms of Service: https://comm.app/terms`;\n+ expect(\n+ getSIWEStatementForPublicKey(validPublicKey) === expectedString,\n+ ).toBe(true);\n+ });\n});\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Introduce `getSIWEStatementForPublicKey(...)` Summary: Given a public key, `getSIWEStatementForPublicKey(...)` generates a statement for SIWE message that conforms to what is described in the whitepaper: https://blob.sh/a3d138.png --- Depends on D6128 Test Plan: included a unit test Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6129
129,184
03.01.2023 13:44:05
28,800
7e3a7434220c96f289fb5ff84d1e92383065a08f
[lib] Introduce `isValidSIWEStatementWithPublicKey(...)` Summary: Introduce `isValidSIWEStatementWithPublicKey(...)` to check if SIWE statement is valid statement **that includes the `Device IdPubKey`** as described in the whitepaper: Depends on D6129 Test Plan: included a unit test (will include more later) Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.js", "new_path": "lib/utils/siwe-utils.js", "diff": "@@ -47,6 +47,11 @@ function getSIWEStatementForPublicKey(publicKey: string): string {\nreturn `Device IdPubKey: ${publicKey} ${siweStatement}`;\n}\n+const siweStatementWithPublicKeyRegex = /^Device IdPubKey: [a-zA-Z0-9+/]{43} By continuing, I accept the Comm Terms of Service: https:\\/\\/comm.app\\/terms$/;\n+function isValidSIWEStatementWithPublicKey(candidate: string): boolean {\n+ return siweStatementWithPublicKeyRegex.test(candidate);\n+}\n+\nexport {\nsiweStatement,\nisValidSIWENonce,\n@@ -54,4 +59,5 @@ export {\nisValidPrimaryIdentityPublicKey,\nisValidSIWEMessage,\ngetSIWEStatementForPublicKey,\n+ isValidSIWEStatementWithPublicKey,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/siwe-utils.test.js", "new_path": "lib/utils/siwe-utils.test.js", "diff": "@@ -5,6 +5,7 @@ import {\nisValidEthereumAddress,\nisValidPrimaryIdentityPublicKey,\nisValidSIWENonce,\n+ isValidSIWEStatementWithPublicKey,\n} from './siwe-utils.js';\ndescribe('SIWE Nonce utils', () => {\n@@ -186,4 +187,18 @@ describe('SIWE Nonce utils', () => {\ngetSIWEStatementForPublicKey(validPublicKey) === expectedString,\n).toBe(true);\n});\n+\n+ it(`isValidSIWEStatementWithPublicKey should be true for well formed SIWE statement`, () => {\n+ const validPublicKey = 'rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4UaYccJYdo';\n+ const expectedString =\n+ `Device IdPubKey: rPFzRtV7E6v1b60zjTvghqb2xgnggmn6j4UaYccJYdo ` +\n+ `By continuing, I accept the Comm Terms of Service: https://comm.app/terms`;\n+\n+ expect(isValidSIWEStatementWithPublicKey(expectedString)).toBe(true);\n+ expect(\n+ isValidSIWEStatementWithPublicKey(\n+ getSIWEStatementForPublicKey(validPublicKey),\n+ ),\n+ ).toBe(true);\n+ });\n});\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Introduce `isValidSIWEStatementWithPublicKey(...)` Summary: Introduce `isValidSIWEStatementWithPublicKey(...)` to check if SIWE statement is valid statement **that includes the `Device IdPubKey`** as described in the whitepaper: https://blob.sh/a3d138.png --- Depends on D6129 Test Plan: included a unit test (will include more later) Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6130
129,187
04.01.2023 19:14:09
25,200
7c75cd42f2f3cdf2de57bc0c7cede4806f8e0724
[lib] Simplify InlineSidebarText and deprecate sendersText Summary: We're not using `sendersText` anymore, so we should get rid of that code. Test Plan: Flow Reviewers: ginsu Subscribers: tomek, atul
[ { "change_type": "MODIFY", "old_path": "lib/hooks/inline-sidebar-text.react.js", "new_path": "lib/hooks/inline-sidebar-text.react.js", "diff": "// @flow\n-import * as React from 'react';\n-\n-import { relativeMemberInfoSelectorForMembersOfThread } from '../selectors/user-selectors';\n-import { stringForUser } from '../shared/user-utils';\nimport type { ThreadInfo } from '../types/thread-types';\n-import { useSelector } from '../utils/redux-utils';\n-import { pluralizeAndTrim } from '../utils/text-utils';\n-\n-function useInlineSidebarText(\n- threadInfo: ?ThreadInfo,\n-): {\n- sendersText: string,\n- repliesText: string,\n-} {\n- const threadMembers = useSelector(\n- relativeMemberInfoSelectorForMembersOfThread(threadInfo?.id),\n- );\n- const sendersText = React.useMemo(() => {\n- const senders = threadMembers\n- .filter(member => member.isSender)\n- .map(stringForUser);\n- return senders.length > 0 ? `${pluralizeAndTrim(senders, 25)} sent ` : '';\n- }, [threadMembers]);\n- const noThreadInfo = !threadInfo;\n-\n- return React.useMemo(() => {\n- if (noThreadInfo) {\n- return { sendersText: '', repliesText: '' };\n+function useInlineSidebarText(threadInfo: ?ThreadInfo): string {\n+ if (!threadInfo) {\n+ return '';\n}\n- const repliesCount = threadInfo?.repliesCount || 1;\n- const repliesText = `${repliesCount} ${\n- repliesCount > 1 ? 'replies' : 'reply'\n- }`;\n-\n- return {\n- sendersText,\n- repliesText,\n- };\n- }, [noThreadInfo, sendersText, threadInfo?.repliesCount]);\n+ const repliesCount = threadInfo.repliesCount || 1;\n+ return `${repliesCount} ${repliesCount > 1 ? 'replies' : 'reply'}`;\n}\nexport default useInlineSidebarText;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/inline-sidebar.react.js", "new_path": "native/chat/inline-sidebar.react.js", "diff": "@@ -31,7 +31,7 @@ type Props = {\n};\nfunction InlineSidebar(props: Props): React.Node {\nconst { disabled = false, reactions, threadInfo } = props;\n- const { repliesText } = useInlineSidebarText(threadInfo);\n+ const repliesText = useInlineSidebarText(threadInfo);\nconst navigateToThread = useNavigateToThread();\nconst onPress = React.useCallback(() => {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/inline-sidebar.react.js", "new_path": "web/chat/inline-sidebar.react.js", "diff": "@@ -19,7 +19,7 @@ type Props = {\n};\nfunction InlineSidebar(props: Props): React.Node {\nconst { threadInfo, positioning, reactions } = props;\n- const inlineSidebarText = useInlineSidebarText(threadInfo);\n+ const repliesText = useInlineSidebarText(threadInfo);\nconst containerClasses = classNames([\ncss.inlineSidebarContainer,\n@@ -45,17 +45,17 @@ function InlineSidebar(props: Props): React.Node {\nconst threadInfoExists = !!threadInfo;\nconst sidebarItem = React.useMemo(() => {\n- if (!threadInfoExists || !inlineSidebarText) {\n+ if (!threadInfoExists || !repliesText) {\nreturn null;\n}\nreturn (\n<div className={css.replies}>\n<CommIcon size={14} icon=\"sidebar-filled\" />\n- {inlineSidebarText.repliesText}\n+ {repliesText}\n</div>\n);\n- }, [threadInfoExists, inlineSidebarText]);\n+ }, [threadInfoExists, repliesText]);\nreturn (\n<div className={containerClasses}>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Simplify InlineSidebarText and deprecate sendersText Summary: We're not using `sendersText` anymore, so we should get rid of that code. Test Plan: Flow Reviewers: ginsu Reviewed By: ginsu Subscribers: tomek, atul Differential Revision: https://phab.comm.dev/D6148
129,184
31.12.2022 05:38:00
28,800
c13c35676480e82d7068526d69e0e1900cb3737b
[keyserver] Store `SIWESocialProof` in `social_proof` column of `cookies` table Summary: Stringify the `SIWESocialProof` object and store in the `social_proof` column of the `cookies` table. Depends on D6135 Test Plan: `public_key` and `social_proof` columns populated as expected: {F313110} Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "keyserver/src/creators/account-creator.js", "new_path": "keyserver/src/creators/account-creator.js", "diff": "@@ -22,6 +22,7 @@ import type {\n} from 'lib/types/device-types.js';\nimport type { CalendarQuery } from 'lib/types/entry-types.js';\nimport { messageTypes } from 'lib/types/message-types';\n+import type { SIWESocialProof } from 'lib/types/siwe-types.js';\nimport { threadTypes } from 'lib/types/thread-types';\nimport { ServerError } from 'lib/utils/errors';\nimport { values } from 'lib/utils/objects';\n@@ -208,6 +209,7 @@ export type ProcessSIWEAccountCreationRequest = {\n+deviceTokenUpdateRequest?: ?DeviceTokenUpdateRequest,\n+platformDetails: PlatformDetails,\n+primaryIdentityPublicKey: ?string,\n+ +socialProof: SIWESocialProof,\n};\n// Note: `processSIWEAccountCreation(...)` assumes that the validity of\n// `ProcessSIWEAccountCreationRequest` was checked at call site.\n@@ -237,6 +239,7 @@ async function processSIWEAccountCreation(\nplatformDetails: request.platformDetails,\ndeviceToken,\nprimaryIdentityPublicKey: request.primaryIdentityPublicKey,\n+ socialProof: request.socialProof,\n}),\ndeleteCookie(viewer.cookieID),\ndbQuery(newUserQuery),\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/responders/user-responders.js", "new_path": "keyserver/src/responders/user-responders.js", "diff": "@@ -26,7 +26,11 @@ import {\n} from 'lib/types/account-types';\nimport type { CalendarQuery } from 'lib/types/entry-types.js';\nimport { defaultNumberPerThread } from 'lib/types/message-types';\n-import type { SIWEAuthRequest, SIWEMessage } from 'lib/types/siwe-types.js';\n+import type {\n+ SIWEAuthRequest,\n+ SIWEMessage,\n+ SIWESocialProof,\n+} from 'lib/types/siwe-types.js';\nimport type {\nSubscriptionUpdateRequest,\nSubscriptionUpdateResponse,\n@@ -204,6 +208,7 @@ async function processSuccessfulLogin(\nuserID: string,\ncalendarQuery: ?CalendarQuery,\nprimaryIdentityPublicKey?: ?string,\n+ socialProof?: ?SIWESocialProof,\n): Promise<LogInResponse> {\nconst request: LogInRequest = input;\nconst newServerTime = Date.now();\n@@ -215,6 +220,7 @@ async function processSuccessfulLogin(\nplatformDetails: request.platformDetails,\ndeviceToken,\nprimaryIdentityPublicKey,\n+ socialProof,\n}),\ndeleteCookie(viewer.cookieID),\n]);\n@@ -383,7 +389,14 @@ async function siweAuthResponder(\n? getPublicKeyFromSIWEStatement(statement)\n: null;\n- // 5. Create account with call to `processSIWEAccountCreation(...)`\n+ // 5. Construct `SIWESocialProof` object with the stringified\n+ // SIWEMessage and the corresponding signature.\n+ const socialProof: SIWESocialProof = {\n+ siweMessage: siweMessage.toMessage(),\n+ siweMessageSignature: signature,\n+ };\n+\n+ // 6. Create account with call to `processSIWEAccountCreation(...)`\n// if address does not correspond to an existing user.\nlet userID = await fetchUserIDForEthereumAddress(siweMessage.address);\nif (!userID) {\n@@ -392,6 +405,7 @@ async function siweAuthResponder(\ndeviceTokenUpdateRequest: deviceTokenUpdateRequest,\nplatformDetails,\nprimaryIdentityPublicKey: primaryIdentityPublicKey,\n+ socialProof: socialProof,\n};\nuserID = await processSIWEAccountCreation(\nviewer,\n@@ -399,13 +413,14 @@ async function siweAuthResponder(\n);\n}\n- // 6. Complete login with call to `processSuccessfulLogin(...)`.\n+ // 7. Complete login with call to `processSuccessfulLogin(...)`.\nreturn await processSuccessfulLogin(\nviewer,\ninput,\nuserID,\ncalendarQuery,\nprimaryIdentityPublicKey,\n+ socialProof,\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/session/cookies.js", "new_path": "keyserver/src/session/cookies.js", "diff": "@@ -19,6 +19,7 @@ import {\nsessionIdentifierTypes,\ntype SessionIdentifierType,\n} from 'lib/types/session-types';\n+import type { SIWESocialProof } from 'lib/types/siwe-types.js';\nimport type { InitialClientSocketMessage } from 'lib/types/socket-types';\nimport type { UserInfo } from 'lib/types/user-types';\nimport { values } from 'lib/utils/objects';\n@@ -645,6 +646,7 @@ type UserCookieCreationParams = {\nplatformDetails: PlatformDetails,\ndeviceToken?: ?string,\nprimaryIdentityPublicKey?: ?string,\n+ socialProof?: ?SIWESocialProof,\n};\n// The result of this function should never be passed directly to the Viewer\n@@ -658,7 +660,12 @@ async function createNewUserCookie(\nuserID: string,\nparams: UserCookieCreationParams,\n): Promise<UserViewerData> {\n- const { platformDetails, deviceToken, primaryIdentityPublicKey } = params;\n+ const {\n+ platformDetails,\n+ deviceToken,\n+ primaryIdentityPublicKey,\n+ socialProof,\n+ } = params;\nconst { platform, ...versions } = platformDetails || defaultPlatformDetails;\nconst versionsString =\nObject.keys(versions).length > 0 ? JSON.stringify(versions) : null;\n@@ -681,10 +688,11 @@ async function createNewUserCookie(\ndeviceToken,\nversionsString,\nprimaryIdentityPublicKey,\n+ JSON.stringify(socialProof),\n];\nconst query = SQL`\nINSERT INTO cookies(id, hash, user, platform, creation_time, last_used,\n- device_token, versions, public_key)\n+ device_token, versions, public_key, social_proof)\nVALUES ${[cookieRow]}\n`;\nawait dbQuery(query);\n" }, { "change_type": "MODIFY", "old_path": "lib/types/siwe-types.js", "new_path": "lib/types/siwe-types.js", "diff": "@@ -26,6 +26,11 @@ export type SIWEAuthServerCall = {\n...LogInExtraInfo,\n};\n+export type SIWESocialProof = {\n+ +siweMessage: string,\n+ +siweMessageSignature: string,\n+};\n+\n// This is a message that the rendered webpage (landing/siwe.react.js) uses to\n// communicate back to the React Native WebView that is rendering it\n// (native/account/siwe-panel.react.js)\n@@ -106,4 +111,5 @@ export type SIWEMessage = {\n// message version.\n+type?: 'Personal signature',\n+validate: (signature: string, provider?: any) => Promise<SIWEMessage>,\n+ +toMessage: () => string,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Store `SIWESocialProof` in `social_proof` column of `cookies` table Summary: Stringify the `SIWESocialProof` object and store in the `social_proof` column of the `cookies` table. --- Depends on D6135 Test Plan: `public_key` and `social_proof` columns populated as expected: {F313110} Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6136
129,200
04.01.2023 10:05:06
18,000
33db22ea20eaac711726b9e631fd61f05388f7b7
[keyserver] remove old gRPC client Summary: we're using tonic instead, so we can remove this. it's not used anywhere Test Plan: ran flow and `yarn dev` in keyserver folder Reviewers: ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/package.json", "new_path": "keyserver/package.json", "diff": "},\n\"dependencies\": {\n\"@babel/runtime\": \"^7.13.10\",\n- \"@grpc/grpc-js\": \"^1.7.1\",\n- \"@grpc/proto-loader\": \"^0.7.3\",\n\"@matrix-org/olm\": \"3.2.4\",\n\"@parse/node-apn\": \"^3.2.0\",\n\"@vingle/bmp-js\": \"^0.2.5\",\n" }, { "change_type": "DELETE", "old_path": "keyserver/src/grpc/grpc-client.js", "new_path": null, "diff": "-// @flow\n-\n-import * as grpc from '@grpc/grpc-js';\n-import * as protoLoader from '@grpc/proto-loader';\n-\n-import type { IdentityServiceClient } from 'lib/types/grpc-types';\n-\n-const PROTO_PATH = '../shared/protos/identity.proto';\n-const packageDefinition = protoLoader.loadSync(PROTO_PATH, {\n- keepCase: true,\n- longs: String,\n- enums: String,\n- defaults: true,\n- oneofs: true,\n-});\n-const identity = grpc.loadPackageDefinition(packageDefinition).identity;\n-const identityClient: IdentityServiceClient = new identity.IdentityService(\n- 'localhost:50051',\n- grpc.credentials.createInsecure(),\n-);\n-\n-export { identityClient };\n" }, { "change_type": "DELETE", "old_path": "lib/types/grpc-types.js", "new_path": null, "diff": "-// @flow\n-\n-export type GetUserPublicKeyRequest = {\n- +userID?: string,\n- +deviceID?: string,\n-};\n-\n-export type GetUserPublicKeyResponse__Output = {\n- +publicKey: string,\n-};\n-\n-export type MetadataValue = string | Buffer;\n-\n-export type MetadataOptions = {\n- +idempotentRequest?: boolean,\n- +waitForReady?: boolean,\n- +cacheableRequest?: boolean,\n- +corked?: boolean,\n-};\n-export type MetadataObject = Map<string, MetadataValue[]>;\n-\n-declare export class Metadata {\n- internalRepr: MetadataObject;\n- constructor(options: MetadataOptions): this;\n-\n- set(key: string, value: MetadataValue): void;\n-\n- add(key: string, value: MetadataValue): void;\n-\n- remove(key: string): void;\n-\n- get(key: string): MetadataValue[];\n-\n- getMap(): {\n- [key: string]: MetadataValue,\n- ...\n- };\n-\n- clone(): Metadata;\n-\n- merge(other: Metadata): void;\n- setOptions(options: MetadataOptions): void;\n- getOptions(): MetadataOptions;\n-\n- toHttp2Headers(): mixed;\n-\n- toJSON(): { [key: string]: MetadataValue[] };\n-\n- static fromHttp2Headers(headers: mixed): Metadata;\n-}\n-\n-declare export var Status: {\n- +OK: 0, // 0\n- +CANCELLED: 1, // 1\n- +UNKNOWN: 2, // 2\n- +INVALID_ARGUMENT: 3, // 3\n- +DEADLINE_EXCEEDED: 4, // 4\n- +NOT_FOUND: 5, // 5\n- +ALREADY_EXISTS: 6, // 6\n- +PERMISSION_DENIED: 7, // 7\n- +RESOURCE_EXHAUSTED: 8, // 8\n- +FAILED_PRECONDITION: 9, // 9\n- +ABORTED: 10, // 10\n- +OUT_OF_RANGE: 11, // 11\n- +UNIMPLEMENTED: 12, // 12\n- +INTERNAL: 13, // 13\n- +UNAVAILABLE: 14, // 14\n- +DATA_LOSS: 15, // 15\n- +UNAUTHENTICATED: 16, // 16\n-};\n-\n-export type WriteCallback = (error?: Error | null) => void;\n-export type MessageContext = {\n- +callback?: WriteCallback,\n- +flags?: number,\n-};\n-\n-export type StatusObject = {\n- +code: typeof Status,\n- +details: string,\n- +metadata: Metadata,\n-};\n-\n-export type InterceptingListener = {\n- +onReceiveMetadata: (metadata: Metadata) => void,\n- +onReceiveMessage: (message: mixed) => void,\n- +onReceiveStatus: (status: StatusObject) => void,\n-};\n-\n-export type InterceptingCallInterface = {\n- +cancelWithStatus: (status: typeof Status, details: string) => void,\n- +getPeer: () => string,\n- +start: (metadata: Metadata, listener?: $Exact<InterceptingListener>) => void,\n- +sendMessageWithContext: (context: MessageContext, message: mixed) => void,\n- +sendMessage: (message: mixed) => void,\n- +startRead: () => void,\n- +halfClose: () => void,\n-};\n-\n-export type EmitterAugmentation1<Name: string | Symbol, Arg> = {\n- +addListener: (event: Name, listener: (arg1: Arg) => void) => ClientUnaryCall,\n- +emit: (event: Name, arg1: Arg) => boolean,\n- +on: (event: Name, listener: (arg1: Arg) => void) => ClientUnaryCall,\n- +once: (event: Name, listener: (arg1: Arg) => void) => ClientUnaryCall,\n- +prependListener: (\n- event: Name,\n- listener: (arg1: Arg) => void,\n- ) => ClientUnaryCall,\n- +prependOnceListener: (\n- event: Name,\n- listener: (arg1: Arg) => void,\n- ) => ClientUnaryCall,\n- +removeListener: (\n- event: Name,\n- listener: (arg1: Arg) => void,\n- ) => ClientUnaryCall,\n-};\n-\n-export type ClientUnaryCall = {\n- ...{\n- +call?: InterceptingCallInterface,\n- +cancel: () => void,\n- +getPeer: () => string,\n- },\n- ...EmitterAugmentation1<'metadata', Metadata>,\n- ...EmitterAugmentation1<'status', StatusObject>,\n- ...\n-} & events$EventEmitter;\n-\n-export type RequestCallback<ResponseType> = (\n- err: Error | null,\n- value?: ResponseType,\n-) => void;\n-\n-export type IdentityServiceClient = {\n- getUserPublicKey(\n- argument: GetUserPublicKeyRequest,\n- callback: RequestCallback<GetUserPublicKeyResponse__Output>,\n- ): ClientUnaryCall,\n- ...\n-};\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "resolved \"https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052\"\nintegrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==\n-\"@grpc/grpc-js@^1.7.1\":\n- version \"1.7.1\"\n- resolved \"https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.7.1.tgz#cfac092e61eac6fe0f80d22943f98e1ba45f02a2\"\n- integrity sha512-GVtMU4oh/TeKkWGzXUEsyZtyvSUIT1z49RtGH1UnEGeL+sLuxKl8QH3KZTlSB329R1sWJmesm5hQ5CxXdYH9dg==\n- dependencies:\n- \"@grpc/proto-loader\" \"^0.7.0\"\n- \"@types/node\" \">=12.12.47\"\n-\n\"@grpc/grpc-js@~1.6.0\":\nversion \"1.6.7\"\nresolved \"https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa\"\nprotobufjs \"^6.10.0\"\nyargs \"^16.2.0\"\n-\"@grpc/proto-loader@^0.7.0\", \"@grpc/proto-loader@^0.7.3\":\n- version \"0.7.3\"\n- resolved \"https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.3.tgz#75a6f95b51b85c5078ac7394da93850c32d36bb8\"\n- integrity sha512-5dAvoZwna2Py3Ef96Ux9jIkp3iZ62TUsV00p3wVBPNX5K178UbNi8Q7gQVqwXT1Yq9RejIGG9G2IPEo93T6RcA==\n- dependencies:\n- \"@types/long\" \"^4.0.1\"\n- lodash.camelcase \"^4.3.0\"\n- long \"^4.0.0\"\n- protobufjs \"^7.0.0\"\n- yargs \"^16.2.0\"\n-\n\"@hapi/hoek@^9.0.0\":\nversion \"9.2.0\"\nresolved \"https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131\"\n@@ -15404,11 +15385,6 @@ long@^4.0.0:\nresolved \"https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28\"\nintegrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==\n-long@^5.0.0:\n- version \"5.2.0\"\n- resolved \"https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61\"\n- integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==\n-\nloose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0:\nversion \"1.4.0\"\nresolved \"https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf\"\n@@ -18410,24 +18386,6 @@ protobufjs@6.11.2, protobufjs@^6.10.0, protobufjs@^6.11.2, protobufjs@^6.8.6:\n\"@types/node\" \">=13.7.0\"\nlong \"^4.0.0\"\n-protobufjs@^7.0.0:\n- version \"7.1.2\"\n- resolved \"https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.1.2.tgz#a0cf6aeaf82f5625bffcf5a38b7cd2a7de05890c\"\n- integrity sha512-4ZPTPkXCdel3+L81yw3dG6+Kq3umdWKh7Dc7GW/CpNk4SX3hK58iPCWeCyhVTDrbkNeKrYNZ7EojM5WDaEWTLQ==\n- dependencies:\n- \"@protobufjs/aspromise\" \"^1.1.2\"\n- \"@protobufjs/base64\" \"^1.1.2\"\n- \"@protobufjs/codegen\" \"^2.0.4\"\n- \"@protobufjs/eventemitter\" \"^1.1.0\"\n- \"@protobufjs/fetch\" \"^1.1.0\"\n- \"@protobufjs/float\" \"^1.0.2\"\n- \"@protobufjs/inquire\" \"^1.1.0\"\n- \"@protobufjs/path\" \"^1.1.2\"\n- \"@protobufjs/pool\" \"^1.1.0\"\n- \"@protobufjs/utf8\" \"^1.1.0\"\n- \"@types/node\" \">=13.7.0\"\n- long \"^5.0.0\"\n-\nproxy-addr@~2.0.7:\nversion \"2.0.7\"\nresolved \"https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] remove old gRPC client Summary: we're using tonic instead, so we can remove this. it's not used anywhere Test Plan: ran flow and `yarn dev` in keyserver folder Reviewers: ashoat Reviewed By: ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D6163
129,200
04.01.2023 14:51:21
18,000
80f5fbfa0321df68c8327cbbda0a69db9492809d
[keyserver] rename node addon Summary: we plan to use this node addon for more than just exposing opaque-ke, so we should rename it to something more generic. Test Plan: yarn cleaninstall Reviewers: tomek, max Subscribers: ashoat, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/Dockerfile", "new_path": "keyserver/Dockerfile", "diff": "@@ -108,15 +108,15 @@ COPY --chown=comm web/package.json web/.flowconfig web/\nCOPY --chown=comm native/package.json native/.flowconfig native/postinstall.sh native/\nCOPY --chown=comm landing/package.json landing/.flowconfig landing/\nCOPY --chown=comm desktop/package.json desktop/\n-COPY --chown=comm keyserver/addons/opaque-ke-napi/package.json \\\n- keyserver/addons/opaque-ke-napi/\n+COPY --chown=comm keyserver/addons/rust-node-addon/package.json \\\n+ keyserver/addons/rust-node-addon/\nCOPY --chown=comm native/expo-modules/android-lifecycle/package.json \\\nnative/expo-modules/android-lifecycle/\n# Create empty Rust library and copy in Cargo.toml file\n-RUN cargo init keyserver/addons/opaque-ke-napi --lib\n-COPY --chown=comm keyserver/addons/opaque-ke-napi/Cargo.toml \\\n- keyserver/addons/opaque-ke-napi/\n+RUN cargo init keyserver/addons/rust-node-addon --lib\n+COPY --chown=comm keyserver/addons/rust-node-addon/Cargo.toml \\\n+ keyserver/addons/rust-node-addon/\n# Copy in files needed for patch-package\nCOPY --chown=comm patches patches/\n@@ -145,10 +145,10 @@ COPY --chown=comm . .\n#-------------------------------------------------------------------------------\n# STEP 9: BUILD NODE ADDON\n-# Now that source files have been copied in, build the opaque-ke-napi addon\n+# Now that source files have been copied in, build rust-node-addon\n#-------------------------------------------------------------------------------\n-RUN yarn workspace opaque-ke-napi build\n+RUN yarn workspace rust-node-addon build\n#-------------------------------------------------------------------------------\n# STEP 10: RUN BUILD SCRIPTS\n" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/.gitignore", "new_path": "keyserver/addons/rust-node-addon/.gitignore", "diff": "" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/Cargo.toml", "new_path": "keyserver/addons/rust-node-addon/Cargo.toml", "diff": "[package]\nedition = \"2021\"\n-name = \"opaque-ke-napi\"\n+name = \"rust-node-addon\"\nversion = \"0.1.0\"\nlicense = \"BSD-3-Clause\"\n" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/build.rs", "new_path": "keyserver/addons/rust-node-addon/build.rs", "diff": "" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/index.js", "new_path": "keyserver/addons/rust-node-addon/index.js", "diff": "@@ -10,16 +10,16 @@ async function getRustAPI(): Promise<RustAPI> {\nlet nativeBinding = null;\nif (platform === 'darwin' && arch === 'x64') {\n// $FlowFixMe\n- nativeBinding = await import('./napi/opaque-ke-napi.darwin-x64.node');\n+ nativeBinding = await import('./napi/rust-node-addon.darwin-x64.node');\n} else if (platform === 'darwin' && arch === 'arm64') {\n// $FlowFixMe\n- nativeBinding = await import('./napi/opaque-ke-napi.darwin-arm64.node');\n+ nativeBinding = await import('./napi/rust-node-addon.darwin-arm64.node');\n} else if (platform === 'linux' && arch === 'x64') {\n// $FlowFixMe\n- nativeBinding = await import('./napi/opaque-ke-napi.linux-x64-gnu.node');\n+ nativeBinding = await import('./napi/rust-node-addon.linux-x64-gnu.node');\n} else if (platform === 'linux' && arch === 'arm64') {\n// $FlowFixMe\n- nativeBinding = await import('./napi/opaque-ke-napi.linux-arm64-gnu.node');\n+ nativeBinding = await import('./napi/rust-node-addon.linux-arm64-gnu.node');\n} else {\nthrow new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);\n}\n" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/package.json", "new_path": "keyserver/addons/rust-node-addon/package.json", "diff": "]\n},\n\"private\": true,\n- \"name\": \"opaque-ke-napi\",\n+ \"name\": \"rust-node-addon\",\n\"version\": \"0.0.1\",\n\"main\": \"index.js\",\n\"type\": \"module\",\n\"napi\": {\n- \"name\": \"opaque-ke-napi\",\n+ \"name\": \"rust-node-addon\",\n\"triples\": {\n\"defaults\": false,\n\"additional\": [\n" }, { "change_type": "RENAME", "old_path": "keyserver/addons/opaque-ke-napi/src/lib.rs", "new_path": "keyserver/addons/rust-node-addon/src/lib.rs", "diff": "" }, { "change_type": "MODIFY", "old_path": "keyserver/loader.mjs", "new_path": "keyserver/loader.mjs", "diff": "@@ -4,7 +4,7 @@ const localPackages = {\nlanding: 'landing',\nlib: 'lib',\nweb: 'web',\n- ['opaque-ke-napi']: 'keyserver/addons/opaque-ke-napi',\n+ ['rust-node-addon']: 'keyserver/addons/rust-node-addon',\n};\nasync function resolve(specifier, context, nextResolve) {\n" }, { "change_type": "MODIFY", "old_path": "keyserver/package.json", "new_path": "keyserver/package.json", "diff": "\"mysql2\": \"^2.3.3\",\n\"node-schedule\": \"^2.1.0\",\n\"nodemailer\": \"^6.6.1\",\n- \"opaque-ke-napi\": \"0.0.1\",\n+ \"rust-node-addon\": \"0.0.1\",\n\"react\": \"18.1.0\",\n\"react-dom\": \"18.1.0\",\n\"react-html-email\": \"^3.0.0\",\n" }, { "change_type": "DELETE", "old_path": "keyserver/src/opaque-ke-napi", "new_path": null, "diff": "-../addons/opaque-ke-napi\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": "keyserver/src/rust-node-addon", "diff": "+../addons/rust-node-addon\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"keyserver\",\n\"landing\",\n\"desktop\",\n- \"keyserver/addons/opaque-ke-napi\",\n+ \"keyserver/addons/rust-node-addon\",\n\"native/expo-modules/android-lifecycle\"\n],\n\"scripts\": {\n- \"clean\": \"yarn workspace lib clean && yarn workspace web clean && yarn workspace native clean && yarn workspace keyserver clean && yarn workspace landing clean && yarn workspace desktop clean && yarn workspace opaque-ke-napi clean && rm -rf node_modules/\",\n+ \"clean\": \"yarn workspace lib clean && yarn workspace web clean && yarn workspace native clean && yarn workspace keyserver clean && yarn workspace landing clean && yarn workspace desktop clean && yarn workspace rust-node-addon clean && rm -rf node_modules/\",\n\"cleaninstall\": \"(killall flow || pkill flow || true) && yarn clean && yarn\",\n\"eslint\": \"eslint .\",\n\"eslint:fix\": \"eslint --fix .\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] rename node addon Summary: we plan to use this node addon for more than just exposing opaque-ke, so we should rename it to something more generic. Test Plan: yarn cleaninstall Reviewers: tomek, max Reviewed By: tomek, max Subscribers: ashoat, atul Differential Revision: https://phab.comm.dev/D6169
129,184
08.01.2023 19:19:45
18,000
b264e6177b3faf31289ce3d59216868b95157f77
[web] Add SIWE dependencies to `web/package.json` Summary: Copy/pasting the SIWE dependencies from `landing` to `web`. Test Plan: NA Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"@fortawesome/free-regular-svg-icons\": \"5.11.2\",\n\"@fortawesome/free-solid-svg-icons\": \"5.11.2\",\n\"@fortawesome/react-fontawesome\": \"0.1.5\",\n+ \"@rainbow-me/rainbowkit\": \"^0.5.0\",\n\"basscss\": \"8.0.2\",\n\"classnames\": \"^2.2.5\",\n\"core-js\": \"^3.6.5\",\n\"detect-browser\": \"^4.0.4\",\n\"exif-js\": \"^2.3.0\",\n\"history\": \"^4.6.3\",\n+ \"ethers\": \"^5.7.0\",\n\"invariant\": \"^2.2.4\",\n\"is-svg\": \"^4.3.0\",\n\"isomorphic-fetch\": \"^3.0.0\",\n\"redux-thunk\": \"^2.2.0\",\n\"reselect\": \"^4.0.0\",\n\"simple-markdown\": \"^0.7.2\",\n+ \"siwe\": \"^1.1.6\",\n\"tinycolor2\": \"^1.4.1\",\n- \"visibilityjs\": \"^2.0.2\"\n+ \"visibilityjs\": \"^2.0.2\",\n+ \"wagmi\": \"^0.6.0\"\n},\n\"jest\": {\n\"roots\": [\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Add SIWE dependencies to `web/package.json` Summary: Copy/pasting the SIWE dependencies from `landing` to `web`. Test Plan: NA Reviewers: ashoat, tomek Reviewed By: tomek Differential Revision: https://phab.comm.dev/D6171
129,188
21.12.2022 11:20:40
-3,600
f72c1cd26d9ab61eeb53f2779b1cfc423b4d4730
[native] add `.cpp` file for `DatabaseManager` Summary: Adding `DatabaseManager.cpp`, because later in the stack there will be more methods in this class Test Plan: Native app builds for both platforms Reviewers: marcin, tomek Subscribers: ashoat, tomek, atul
[ { "change_type": "ADD", "old_path": null, "new_path": "native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp", "diff": "+#include \"DatabaseManager.h\"\n+#include \"SQLiteQueryExecutor.h\"\n+\n+namespace comm {\n+\n+const DatabaseQueryExecutor &DatabaseManager::getQueryExecutor() {\n+ // TODO: conditionally create desired type of db manager\n+ // maybe basing on some preprocessor flag\n+ thread_local SQLiteQueryExecutor instance;\n+ return instance;\n+}\n+\n+} // namespace comm\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h", "new_path": "native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h", "diff": "@@ -8,12 +8,7 @@ namespace comm {\nclass DatabaseManager {\npublic:\n- static const DatabaseQueryExecutor &getQueryExecutor() {\n- // TODO: conditionally create desired type of db manager\n- // maybe basing on some preprocessor flag\n- thread_local SQLiteQueryExecutor instance;\n- return instance;\n- }\n+ static const DatabaseQueryExecutor &getQueryExecutor();\n};\n} // namespace comm\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "8B99BAAC28D50F3000EB5ADB /* libnative_rust_library.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B99BAAB28D50F3000EB5ADB /* libnative_rust_library.a */; };\n8B99BAAE28D511FF00EB5ADB /* lib.rs.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B99BAAD28D511FF00EB5ADB /* lib.rs.cc */; };\n8E43C32C291E5B4A009378F5 /* TerminateApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8E43C32B291E5B4A009378F5 /* TerminateApp.mm */; };\n+ 8E86A6D329537EBB000BBE7D /* DatabaseManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8E86A6D229537EBB000BBE7D /* DatabaseManager.cpp */; };\nB71AFF1F265EDD8600B22352 /* IBMPlexSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B71AFF1E265EDD8600B22352 /* IBMPlexSans-Medium.ttf */; };\nCB1648AF27CFBE6A00394D9D /* CryptoModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7B26BBDA6100EDE27D /* CryptoModule.cpp */; };\nCB38B48228771C7A00171182 /* NonBlockingLock.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB38B47B287718A200171182 /* NonBlockingLock.mm */; };\n8B99BAAD28D511FF00EB5ADB /* lib.rs.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lib.rs.cc; sourceTree = \"<group>\"; };\n8E43C32B291E5B4A009378F5 /* TerminateApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TerminateApp.mm; path = Comm/TerminateApp.mm; sourceTree = \"<group>\"; };\n8E43C32E291E5B9D009378F5 /* TerminateApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerminateApp.h; path = ../cpp/CommonCpp/Tools/TerminateApp.h; sourceTree = \"<group>\"; };\n+ 8E86A6D229537EBB000BBE7D /* DatabaseManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseManager.cpp; sourceTree = \"<group>\"; };\n913E5A7BDECB327E3DE11053 /* Pods-NotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-NotificationService.release.xcconfig\"; path = \"Target Support Files/Pods-NotificationService/Pods-NotificationService.release.xcconfig\"; sourceTree = \"<group>\"; };\n994BEBDD4E4959F69CEA0BC3 /* libPods-Comm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-Comm.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\nB7055C6B26E477CF00BE0548 /* MessageStoreOperations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageStoreOperations.h; sourceTree = \"<group>\"; };\n71BE843F2636A944002849D2 /* DatabaseManagers */ = {\nisa = PBXGroup;\nchildren = (\n+ 8E86A6D229537EBB000BBE7D /* DatabaseManager.cpp */,\n71BE84402636A944002849D2 /* DatabaseQueryExecutor.h */,\n71BE84412636A944002849D2 /* SQLiteQueryExecutor.cpp */,\n71BE84422636A944002849D2 /* SQLiteQueryExecutor.h */,\n71BE844A2636A944002849D2 /* CommCoreModule.cpp in Sources */,\n71D4D7CC26C50B1000FCDBCD /* CommSecureStore.mm in Sources */,\n711B408425DA97F9005F8F06 /* dummy.swift in Sources */,\n+ 8E86A6D329537EBB000BBE7D /* DatabaseManager.cpp in Sources */,\nCBDEC69B28ED867000C17588 /* GlobalDBSingleton.mm in Sources */,\n13B07FC11A68108700A75B9A /* main.m in Sources */,\n71BE844B2636A944002849D2 /* SQLiteQueryExecutor.cpp in Sources */,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] add `.cpp` file for `DatabaseManager` Summary: Adding `DatabaseManager.cpp`, because later in the stack there will be more methods in this class Test Plan: Native app builds for both platforms Reviewers: marcin, tomek Reviewed By: marcin, tomek Subscribers: ashoat, tomek, atul Differential Revision: https://phab.comm.dev/D5990
129,184
09.01.2023 14:38:24
18,000
5a9d78ab5aa70a543dcdcac546a2136916d393e6
[web] Replace dashes in `log-in-form.css` selector names with underscores Summary: Super minor refactor. Makes things easier to work with in my editor. Test Plan: Careful reading Reviewers: ashoat, tomek
[ { "change_type": "MODIFY", "old_path": "web/account/log-in-form.css", "new_path": "web/account/log-in-form.css", "diff": "-div.modal-body {\n+div.modal_body {\ndisplay: flex;\nflex-direction: column;\npadding: 20px 40px;\n@@ -7,32 +7,32 @@ div.modal-body {\nbox-shadow: 0 0 40px rgba(126, 87, 194, 0.5);\n}\n-div.form-title {\n+div.form_title {\npadding: 6px 6px 0 0;\nfont-size: var(--s-font-14);\nfont-weight: var(--bold);\ncolor: var(--fg);\n}\n-div.form-content {\n+div.form_content {\nmargin-top: 4px;\nmargin-bottom: 8px;\nfont-family: var(--font-stack);\ncolor: var(--fg);\n}\n-div.form-footer {\n+div.form_footer {\ndisplay: flex;\nflex-direction: column;\nmargin-top: 16px;\n}\n-div.form-footer > button:disabled {\n+div.form_footer > button:disabled {\nmin-height: 48px;\nopacity: 0.5;\n}\n-div.modal-form-error {\n+div.modal_form_error {\nmargin-top: 16px;\nfont-size: 14px;\ncolor: var(--error);\n" }, { "change_type": "MODIFY", "old_path": "web/account/log-in-form.react.js", "new_path": "web/account/log-in-form.react.js", "diff": "@@ -121,11 +121,11 @@ function LoginForm(): React.Node {\n}, [inputDisabled]);\nreturn (\n- <div className={css['modal-body']}>\n+ <div className={css.modal_body}>\n<form method=\"POST\">\n<div>\n- <div className={css['form-title']}>Username</div>\n- <div className={css['form-content']}>\n+ <div className={css.form_title}>Username</div>\n+ <div className={css.form_content}>\n<Input\ntype=\"text\"\nplaceholder=\"Username\"\n@@ -138,8 +138,8 @@ function LoginForm(): React.Node {\n</div>\n</div>\n<div>\n- <div className={css['form-title']}>Password</div>\n- <div className={css['form-content']}>\n+ <div className={css.form_title}>Password</div>\n+ <div className={css.form_content}>\n<PasswordInput\nvalue={password}\nonChange={onPasswordChange}\n@@ -147,7 +147,7 @@ function LoginForm(): React.Node {\n/>\n</div>\n</div>\n- <div className={css['form-footer']}>\n+ <div className={css.form_footer}>\n<Button\nvariant=\"filled\"\ntype=\"submit\"\n@@ -156,7 +156,7 @@ function LoginForm(): React.Node {\n>\n{loginButtonContent}\n</Button>\n- <div className={css['modal-form-error']}>{errorMessage}</div>\n+ <div className={css.modal_form_error}>{errorMessage}</div>\n</div>\n</form>\n</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Replace dashes in `log-in-form.css` selector names with underscores Summary: Super minor refactor. Makes things easier to work with in my editor. Test Plan: Careful reading Reviewers: ashoat, tomek Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D6202
129,187
10.01.2023 16:28:08
18,000
5458013b9224ae708d5b3cdb29eb7a2d13ccf1d6
[lib] Remove messageTypeGeneratesNotifs function Summary: This can be removed following D646, as the function doesn't seem to be doing anything other than adding a layer of indirection now. Test Plan: Flow Reviewers: ginsu Subscribers: tomek, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/src/creators/message-creator.js", "new_path": "keyserver/src/creators/message-creator.js", "diff": "@@ -5,7 +5,6 @@ import invariant from 'invariant';\nimport { permissionLookup } from 'lib/permissions/thread-permissions';\nimport {\nrawMessageInfoFromMessageData,\n- messageTypeGeneratesNotifs,\nshimUnsupportedRawMessageInfos,\nstripLocalIDs,\n} from 'lib/shared/message-utils';\n@@ -378,10 +377,11 @@ async function postMessageSend(\ninvariant(messageIndices, `indices should exist for thread ${threadID}`);\nfor (const messageIndex of messageIndices) {\nconst messageInfo = messageInfos[messageIndex];\n+ const { type } = messageInfo;\nif (\n(messageInfo.type !== messageTypes.CREATE_SUB_THREAD ||\nsubthreadsCanNotify.has(messageInfo.childThreadID)) &&\n- messageTypeGeneratesNotifs(messageInfo.type) &&\n+ messageSpecs[type].generatesNotifs &&\nmessageInfo.creatorID !== userID\n) {\nuserPushInfo.messageInfos.push(messageInfo);\n" }, { "change_type": "MODIFY", "old_path": "lib/shared/message-utils.js", "new_path": "lib/shared/message-utils.js", "diff": "@@ -13,7 +13,6 @@ import {\ntype RobotextMessageInfo,\ntype RawMultimediaMessageInfo,\ntype MessageData,\n- type MessageType,\ntype MessageTruncationStatus,\ntype MultimediaMessageData,\ntype MessageStore,\n@@ -218,10 +217,6 @@ function mostRecentMessageTimestamp(\nreturn _maxBy('time')(messageInfos).time;\n}\n-function messageTypeGeneratesNotifs(type: MessageType): boolean {\n- return messageSpecs[type].generatesNotifs;\n-}\n-\nfunction splitRobotext(robotext: string): string[] {\nreturn robotext.split(/(<[^<>|]+\\|[^<>|]+>)/g);\n}\n@@ -543,7 +538,6 @@ export {\nsortMessageIDs,\nrawMessageInfoFromMessageData,\nmostRecentMessageTimestamp,\n- messageTypeGeneratesNotifs,\nsplitRobotext,\nparseRobotextEntity,\nusersInMessageInfos,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Remove messageTypeGeneratesNotifs function Summary: This can be removed following D646, as the function doesn't seem to be doing anything other than adding a layer of indirection now. Test Plan: Flow Reviewers: ginsu Reviewed By: ginsu Subscribers: tomek, atul Differential Revision: https://phab.comm.dev/D6216
129,187
10.01.2023 16:50:37
18,000
7407b0a6395ea55749fdc32d92cf5f99afcfd64a
[keyserver] Rename subthreadsCanNotify to userNotMemberOfSubthreads Summary: Depends on D6216 Test Plan: Flow Reviewers: ginsu Subscribers: tomek, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/src/creators/message-creator.js", "new_path": "keyserver/src/creators/message-creator.js", "diff": "@@ -49,7 +49,7 @@ type UserThreadInfo = {\n>,\n+threadIDs: Set<string>,\n+notFocusedThreadIDs: Set<string>,\n- +subthreadsCanNotify: Set<string>,\n+ +userNotMemberOfSubthreads: Set<string>,\n+subthreadsCanSetToUnread: Set<string>,\n};\n@@ -319,7 +319,7 @@ async function postMessageSend(\ndevices: new Map(),\nthreadIDs: new Set(),\nnotFocusedThreadIDs: new Set(),\n- subthreadsCanNotify: new Set(),\n+ userNotMemberOfSubthreads: new Set(),\nsubthreadsCanSetToUnread: new Set(),\n};\nperUserInfo.set(userID, thisUserInfo);\n@@ -344,7 +344,7 @@ async function postMessageSend(\n!isSubthreadMember ||\n!permissionLookup(subthreadPermissions, threadPermissions.VISIBLE)\n) {\n- thisUserInfo.subthreadsCanNotify.add(subthread);\n+ thisUserInfo.userNotMemberOfSubthreads.add(subthread);\n}\n}\n}\n@@ -366,7 +366,7 @@ async function postMessageSend(\nconst latestMessagesPerUser: LatestMessagesPerUser = new Map();\nfor (const pair of perUserInfo) {\nconst [userID, preUserPushInfo] = pair;\n- const { subthreadsCanNotify } = preUserPushInfo;\n+ const { userNotMemberOfSubthreads } = preUserPushInfo;\nconst userPushInfo = {\ndevices: [...preUserPushInfo.devices.values()],\nmessageInfos: [],\n@@ -380,7 +380,7 @@ async function postMessageSend(\nconst { type } = messageInfo;\nif (\n(messageInfo.type !== messageTypes.CREATE_SUB_THREAD ||\n- subthreadsCanNotify.has(messageInfo.childThreadID)) &&\n+ userNotMemberOfSubthreads.has(messageInfo.childThreadID)) &&\nmessageSpecs[type].generatesNotifs &&\nmessageInfo.creatorID !== userID\n) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Rename subthreadsCanNotify to userNotMemberOfSubthreads Summary: Depends on D6216 Test Plan: Flow Reviewers: ginsu Reviewed By: ginsu Subscribers: tomek, atul Differential Revision: https://phab.comm.dev/D6222
129,205
05.12.2022 16:42:03
-3,600
174fffba3a1839f34e0417c31896070a938401e0
[services][backup] Scaffold gRPC server Summary: Created gRPC handlers, added logging and server init code. Some copy-paste from blob service. Depends on D5842 Test Plan: Service should respond with `UNIMPLEMENTED` to gRPC calls. Reviewers: varun, tomek, jon Subscribers: ashoat, atul
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/src/constants.rs", "diff": "+pub const DEFAULT_GRPC_SERVER_PORT: u64 = 50051;\n+pub const LOG_LEVEL_ENV_VAR: &str =\n+ tracing_subscriber::filter::EnvFilter::DEFAULT_ENV;\n" }, { "change_type": "MODIFY", "old_path": "services/backup/src/main.rs", "new_path": "services/backup/src/main.rs", "diff": "+use anyhow::Result;\n+use std::net::SocketAddr;\n+use tonic::transport::Server;\n+use tracing::{info, Level};\n+use tracing_subscriber::EnvFilter;\n+\n+use crate::service::{BackupServiceServer, MyBackupService};\n+\n+pub mod constants;\npub mod service;\n-fn main() {\n- println!(\"Hello, world!\");\n+fn configure_logging() -> Result<()> {\n+ let filter = EnvFilter::builder()\n+ .with_default_directive(Level::INFO.into())\n+ .with_env_var(constants::LOG_LEVEL_ENV_VAR)\n+ .from_env_lossy();\n+\n+ let subscriber = tracing_subscriber::fmt().with_env_filter(filter).finish();\n+ tracing::subscriber::set_global_default(subscriber)?;\n+ Ok(())\n+}\n+\n+async fn run_grpc_server() -> Result<()> {\n+ let addr: SocketAddr =\n+ format!(\"[::]:{}\", constants::DEFAULT_GRPC_SERVER_PORT).parse()?;\n+ let backup_service = MyBackupService::default();\n+\n+ info!(\"Starting gRPC server listening at {}\", addr.to_string());\n+ Server::builder()\n+ .add_service(BackupServiceServer::new(backup_service))\n+ .serve(addr)\n+ .await?;\n+\n+ Ok(())\n+}\n+\n+#[tokio::main]\n+async fn main() -> Result<()> {\n+ configure_logging()?;\n+\n+ run_grpc_server().await\n}\n" }, { "change_type": "MODIFY", "old_path": "services/backup/src/service/mod.rs", "new_path": "services/backup/src/service/mod.rs", "diff": "-pub mod proto {\n+use proto::backup_service_server::BackupService;\n+use std::pin::Pin;\n+use tokio_stream::Stream;\n+use tonic::{Request, Response, Status};\n+use tracing::instrument;\n+\n+mod proto {\ntonic::include_proto!(\"backup\");\n}\n+pub use proto::backup_service_server::BackupServiceServer;\n+\n+#[derive(Default)]\n+pub struct MyBackupService {}\n+\n+// gRPC implementation\n+#[tonic::async_trait]\n+impl BackupService for MyBackupService {\n+ type CreateNewBackupStream = Pin<\n+ Box<\n+ dyn Stream<Item = Result<proto::CreateNewBackupResponse, Status>> + Send,\n+ >,\n+ >;\n+\n+ #[instrument(skip(self))]\n+ async fn create_new_backup(\n+ &self,\n+ _request: Request<tonic::Streaming<proto::CreateNewBackupRequest>>,\n+ ) -> Result<Response<Self::CreateNewBackupStream>, Status> {\n+ Err(Status::unimplemented(\"unimplemented\"))\n+ }\n+\n+ #[instrument(skip(self))]\n+ async fn send_log(\n+ &self,\n+ _request: Request<tonic::Streaming<proto::SendLogRequest>>,\n+ ) -> Result<Response<proto::SendLogResponse>, Status> {\n+ Err(Status::unimplemented(\"unimplemented\"))\n+ }\n+\n+ type RecoverBackupKeyStream = Pin<\n+ Box<\n+ dyn Stream<Item = Result<proto::RecoverBackupKeyResponse, Status>> + Send,\n+ >,\n+ >;\n+\n+ #[instrument(skip(self))]\n+ async fn recover_backup_key(\n+ &self,\n+ _request: Request<tonic::Streaming<proto::RecoverBackupKeyRequest>>,\n+ ) -> Result<Response<Self::RecoverBackupKeyStream>, Status> {\n+ Err(Status::unimplemented(\"unimplemented\"))\n+ }\n+\n+ type PullBackupStream = Pin<\n+ Box<dyn Stream<Item = Result<proto::PullBackupResponse, Status>> + Send>,\n+ >;\n+\n+ #[instrument(skip(self))]\n+ async fn pull_backup(\n+ &self,\n+ _request: Request<proto::PullBackupRequest>,\n+ ) -> Result<Response<Self::PullBackupStream>, Status> {\n+ Err(Status::unimplemented(\"unimplemented\"))\n+ }\n+\n+ #[instrument(skip(self))]\n+ async fn add_attachments(\n+ &self,\n+ _request: Request<proto::AddAttachmentsRequest>,\n+ ) -> Result<Response<()>, Status> {\n+ Err(Status::unimplemented(\"unimplemented\"))\n+ }\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services][backup] Scaffold gRPC server Summary: Created gRPC handlers, added logging and server init code. Some copy-paste from blob service. Depends on D5842 Test Plan: Service should respond with `UNIMPLEMENTED` to gRPC calls. Reviewers: varun, tomek, jon Reviewed By: varun, tomek Subscribers: ashoat, atul Differential Revision: https://phab.comm.dev/D5843