Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33309914
D6881.1768806169.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D6881.1768806169.diff
View Options
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -120,7 +120,13 @@
): ((logInInfo: LogInInfo) => Promise<LogInResult>) =>
async logInInfo => {
const watchedIDs = threadWatcher.getWatchedIDs();
- const { logInActionSource, ...restLogInInfo } = logInInfo;
+ const {
+ logInActionSource,
+ primaryIdentityPublicKeys,
+ notificationIdentityPublicKeys,
+ ...restLogInInfo
+ } = logInInfo;
+
const response = await callServerEndpoint(
'log_in',
{
diff --git a/lib/types/account-types.js b/lib/types/account-types.js
--- a/lib/types/account-types.js
+++ b/lib/types/account-types.js
@@ -1,5 +1,6 @@
// @flow
+import type { OLMIdentityKeys } from './crypto-types.js';
import type { PlatformDetails } from './device-types.js';
import type {
CalendarQuery,
@@ -104,6 +105,8 @@
+calendarQuery: CalendarQuery,
+deviceTokenUpdateRequest?: ?DeviceTokenUpdateRequest,
+primaryIdentityPublicKey?: string,
+ +primaryIdentityPublicKeys?: ?OLMIdentityKeys,
+ +notificationIdentityPublicKeys?: ?OLMIdentityKeys,
};
export type LogInInfo = {
diff --git a/web/account/traditional-login-form.react.js b/web/account/traditional-login-form.react.js
--- a/web/account/traditional-login-form.react.js
+++ b/web/account/traditional-login-form.react.js
@@ -41,6 +41,9 @@
const primaryIdentityPublicKeys: ?OLMIdentityKeys = useSelector(
state => state.cryptoStore.primaryIdentityKeys,
);
+ const notificationIdentityPublicKeys: ?OLMIdentityKeys = useSelector(
+ state => state.cryptoStore.notificationIdentityKeys,
+ );
const usernameInputRef = React.useRef();
React.useEffect(() => {
@@ -72,12 +75,18 @@
primaryIdentityPublicKeys,
'primaryIdentityPublicKeys must be set in logInAction',
);
+ invariant(
+ notificationIdentityPublicKeys,
+ 'notificationIdentityPublicKeys must be set in logInAction',
+ );
const result = await callLogIn({
...extraInfo,
username,
password,
logInActionSource: logInActionSources.logInFromWebForm,
primaryIdentityPublicKey: primaryIdentityPublicKeys.ed25519,
+ primaryIdentityPublicKeys,
+ notificationIdentityPublicKeys,
});
modalContext.popModal();
return result;
@@ -93,7 +102,14 @@
throw e;
}
},
- [callLogIn, modalContext, password, primaryIdentityPublicKeys, username],
+ [
+ callLogIn,
+ modalContext,
+ notificationIdentityPublicKeys,
+ password,
+ primaryIdentityPublicKeys,
+ username,
+ ],
);
const onSubmit = React.useCallback(
@@ -176,6 +192,8 @@
disabled={
primaryIdentityPublicKeys === null ||
primaryIdentityPublicKeys === undefined ||
+ notificationIdentityPublicKeys === null ||
+ notificationIdentityPublicKeys === undefined ||
inputDisabled
}
onClick={onSubmit}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 7:02 AM (15 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5955055
Default Alt Text
D6881.1768806169.diff (3 KB)
Attached To
Mode
D6881: [web] Ensure that `[primary/notification]IdentityPublicKeys` are set in `TraditionalLoginForm`
Attached
Detach File
Event Timeline
Log In to Comment