Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3394146
D10689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
28 KB
Referenced Files
None
Subscribers
None
D10689.diff
View Options
diff --git a/lib/components/edit-user-avatar-provider.react.js b/lib/components/edit-user-avatar-provider.react.js
--- a/lib/components/edit-user-avatar-provider.react.js
+++ b/lib/components/edit-user-avatar-provider.react.js
@@ -11,7 +11,7 @@
import type { SetState } from '../types/hook-types.js';
import type { LoadingStatus } from '../types/loading-types.js';
import type { NativeMediaSelection } from '../types/media-types.js';
-import { useServerCall } from '../utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
@@ -52,7 +52,7 @@
React.useRef<RegistrationMode>(registrationModeOff);
const dispatchActionPromise = useDispatchActionPromise();
- const updateUserAvatarCall = useServerCall(updateUserAvatar);
+ const updateUserAvatarCall = useLegacyAshoatKeyserverCall(updateUserAvatar);
const [userAvatarMediaUploadInProgress, setUserAvatarMediaUploadInProgress] =
React.useState(false);
diff --git a/lib/hooks/relationship-prompt.js b/lib/hooks/relationship-prompt.js
--- a/lib/hooks/relationship-prompt.js
+++ b/lib/hooks/relationship-prompt.js
@@ -14,7 +14,7 @@
} from '../types/relationship-types.js';
import type { ThreadInfo } from '../types/thread-types.js';
import type { UserInfo } from '../types/user-types.js';
-import { useServerCall } from '../utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
@@ -66,7 +66,9 @@
otherUserID?: string,
onErrorCallback?: () => void,
): RelationshipCallbacks {
- const callUpdateRelationships = useServerCall(serverUpdateRelationships);
+ const callUpdateRelationships = useLegacyAshoatKeyserverCall(
+ serverUpdateRelationships,
+ );
const updateRelationship = React.useCallback(
async (action: RelationshipAction) => {
try {
diff --git a/lib/shared/crypto-utils.js b/lib/shared/crypto-utils.js
--- a/lib/shared/crypto-utils.js
+++ b/lib/shared/crypto-utils.js
@@ -12,7 +12,7 @@
OLMPrekey,
} from '../types/crypto-types';
import type { OlmSessionInitializationInfo } from '../types/request-types';
-import { useServerCall } from '../utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
import type {
CallSingleKeyserverEndpointOptions,
CallSingleKeyserverEndpoint,
@@ -35,7 +35,7 @@
notificationsInitializationInfo: OlmSessionInitializationInfo,
) => Promise<string>,
): (options?: ?InitialNotifMessageOptions) => Promise<string> {
- const callGetOlmSessionInitializationData = useServerCall(
+ const callGetOlmSessionInitializationData = useLegacyAshoatKeyserverCall(
getOlmSessionInitializationData,
);
const dispatchActionPromise = useDispatchActionPromise();
diff --git a/lib/shared/search-utils.js b/lib/shared/search-utils.js
--- a/lib/shared/search-utils.js
+++ b/lib/shared/search-utils.js
@@ -35,7 +35,7 @@
UserListItem,
GlobalAccountUserInfo,
} from '../types/user-types.js';
-import { useServerCall } from '../utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
import { isValidENSName } from '../utils/ens-helpers.js';
import { values } from '../utils/objects.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
@@ -380,7 +380,7 @@
const [serverSearchResults, setServerSearchResults] = React.useState<
$ReadOnlyArray<GlobalAccountUserInfo>,
>([]);
- const callSearchUsers = useServerCall(searchUsers);
+ const callSearchUsers = useLegacyAshoatKeyserverCall(searchUsers);
const dispatchActionPromise = useDispatchActionPromise();
React.useEffect(() => {
if (forwardLookupSearchText.length === 0) {
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -109,7 +109,7 @@
LoggedInUserInfo,
UserInfo,
} from '../types/user-types.js';
-import { useServerCall } from '../utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
import type { GetENSNames } from '../utils/ens-helpers.js';
import {
ET,
@@ -1510,7 +1510,7 @@
searchText: string,
viewerID: ?string,
): ThreadListSearchResult {
- const callSearchUsers = useServerCall(searchUserCall);
+ const callSearchUsers = useLegacyAshoatKeyserverCall(searchUserCall);
const usersWithPersonalThread = useSelector(usersWithPersonalThreadSelector);
const forwardLookupSearchText = useForwardLookupSearchText(searchText);
const searchUsers = React.useCallback(
diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js
--- a/lib/utils/action-utils.js
+++ b/lib/utils/action-utils.js
@@ -16,7 +16,7 @@
callSingleKeyserverEndpoint: CallSingleKeyserverEndpoint,
) => F;
-function useServerCall<F>(
+function useLegacyAshoatKeyserverCall<F>(
serverCall: ActionFunc<F>,
paramOverride?: ?Partial<ServerCallSelectorParams>,
): F {
@@ -51,4 +51,4 @@
}, [serverCall, serverCallState, dispatch, paramOverride, selector]);
}
-export { useServerCall };
+export { useLegacyAshoatKeyserverCall };
diff --git a/native/account/register-panel.react.js b/native/account/register-panel.react.js
--- a/native/account/register-panel.react.js
+++ b/native/account/register-panel.react.js
@@ -32,7 +32,7 @@
} from 'lib/types/account-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { Dispatch } from 'lib/types/redux-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -484,7 +484,7 @@
const dispatch = useDispatch();
const dispatchActionPromise = useDispatchActionPromise();
- const callRegister = useServerCall(keyserverRegister);
+ const callRegister = useLegacyAshoatKeyserverCall(keyserverRegister);
const getInitialNotificationsEncryptedMessage =
useInitialNotificationsEncryptedMessage(
nativeNotificationsSessionCreator,
diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js
--- a/native/account/registration/connect-ethereum.react.js
+++ b/native/account/registration/connect-ethereum.react.js
@@ -10,7 +10,7 @@
} from 'lib/actions/user-actions.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { SIWEResult } from 'lib/types/siwe-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useGetEthereumAccountFromSIWEResult } from './ethereum-utils.js';
@@ -138,7 +138,7 @@
[keyserverURL],
);
- const exactSearchUserCall = useServerCall(
+ const exactSearchUserCall = useLegacyAshoatKeyserverCall(
exactSearchUser,
serverCallParamOverride,
);
diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -10,7 +10,7 @@
identityRegisterActionTypes,
} from 'lib/actions/user-actions.js';
import type { LogInStartingPayload } from 'lib/types/account-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
@@ -66,7 +66,7 @@
const logInExtraInfo = useSelector(nativeLogInExtraInfoSelector);
const dispatchActionPromise = useDispatchActionPromise();
- const callKeyserverRegister = useServerCall(keyserverRegister);
+ const callKeyserverRegister = useLegacyAshoatKeyserverCall(keyserverRegister);
const callIdentityRegister = useIdentityRegister();
const identityRegisterUsernameAccount = React.useCallback(
diff --git a/native/account/registration/username-selection.react.js b/native/account/registration/username-selection.react.js
--- a/native/account/registration/username-selection.react.js
+++ b/native/account/registration/username-selection.react.js
@@ -10,7 +10,7 @@
} from 'lib/actions/user-actions.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { validUsernameRegex } from 'lib/shared/account-utils.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
@@ -74,7 +74,7 @@
[keyserverURL],
);
- const exactSearchUserCall = useServerCall(
+ const exactSearchUserCall = useLegacyAshoatKeyserverCall(
exactSearchUser,
serverCallParamOverride,
);
diff --git a/native/account/siwe-hooks.js b/native/account/siwe-hooks.js
--- a/native/account/siwe-hooks.js
+++ b/native/account/siwe-hooks.js
@@ -8,7 +8,7 @@
LogInStartingPayload,
LogInExtraInfo,
} from 'lib/types/account-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import type { CallSingleKeyserverEndpointOptions } from 'lib/utils/call-single-keyserver-endpoint.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -26,7 +26,7 @@
SIWEServerCallParams,
?CallSingleKeyserverEndpointOptions,
) => Promise<void> {
- const siweAuthCall = useServerCall(siweAuth);
+ const siweAuthCall = useLegacyAshoatKeyserverCall(siweAuth);
const callSIWE = React.useCallback(
(
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -13,7 +13,7 @@
import type { ServerCallSelectorParams } from 'lib/keyserver-conn/call-keyserver-endpoint-provider.react.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { SIWEWebViewMessage, SIWEResult } from 'lib/types/siwe-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useKeyboardHeight } from '../keyboard/keyboard-hooks.js';
@@ -49,7 +49,7 @@
};
function SIWEPanel(props: Props): React.Node {
const dispatchActionPromise = useDispatchActionPromise();
- const getSIWENonceCall = useServerCall(
+ const getSIWENonceCall = useLegacyAshoatKeyserverCall(
getSIWENonce,
props.keyserverCallParamOverride,
);
diff --git a/native/account/terms-and-privacy-modal.react.js b/native/account/terms-and-privacy-modal.react.js
--- a/native/account/terms-and-privacy-modal.react.js
+++ b/native/account/terms-and-privacy-modal.react.js
@@ -17,7 +17,7 @@
} from 'lib/actions/user-actions.js';
import { type PolicyType, policyTypes } from 'lib/facts/policies.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { acknowledgePolicy } from 'lib/utils/policy-acknowledge-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -44,7 +44,8 @@
function TermsAndPrivacyModal(props: Props): React.Node {
const loadingStatus = useSelector(loadingStatusSelector);
const [acknowledgmentError, setAcknowledgmentError] = React.useState('');
- const sendAcknowledgmentRequest = useServerCall(policyAcknowledgment);
+ const sendAcknowledgmentRequest =
+ useLegacyAshoatKeyserverCall(policyAcknowledgment);
const dispatchActionPromise = useDispatchActionPromise();
const policyType = props.route.params.policyType;
diff --git a/native/avatars/avatar-hooks.js b/native/avatars/avatar-hooks.js
--- a/native/avatars/avatar-hooks.js
+++ b/native/avatars/avatar-hooks.js
@@ -27,7 +27,7 @@
MediaLibrarySelection,
MediaMissionFailure,
} from 'lib/types/media-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
import CommIcon from '../components/comm-icon.react.js';
@@ -55,7 +55,7 @@
}
function useUploadProcessedMedia(): MediaResult => Promise<?AvatarDBContent> {
- const callUploadMultimedia = useServerCall(uploadMultimedia);
+ const callUploadMultimedia = useLegacyAshoatKeyserverCall(uploadMultimedia);
const callBlobServiceUpload = useBlobServiceUpload();
const uploadProcessedMultimedia: MediaResult => Promise<?AvatarDBContent> =
React.useCallback(
diff --git a/native/chat/settings/thread-settings-edit-relationship.react.js b/native/chat/settings/thread-settings-edit-relationship.react.js
--- a/native/chat/settings/thread-settings-edit-relationship.react.js
+++ b/native/chat/settings/thread-settings-edit-relationship.react.js
@@ -19,7 +19,7 @@
type RelationshipButton,
} from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Button from '../../components/button.react.js';
@@ -48,7 +48,9 @@
const [otherUserInfo] = useENSNames([otherUserInfoFromRedux]);
- const callUpdateRelationships = useServerCall(serverUpdateRelationships);
+ const callUpdateRelationships = useLegacyAshoatKeyserverCall(
+ serverUpdateRelationships,
+ );
const updateRelationship = React.useCallback(
async (action: RelationshipAction) => {
try {
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -83,7 +83,7 @@
type NewThreadResult,
type ThreadInfo,
} from 'lib/types/thread-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import type {
CallSingleKeyserverEndpointOptions,
CallSingleKeyserverEndpointResponse,
@@ -1714,7 +1714,7 @@
);
const hasWiFi = useSelector(state => state.connectivity.hasWiFi);
const calendarQuery = useCalendarQuery();
- const callUploadMultimedia = useServerCall(uploadMultimedia);
+ const callUploadMultimedia = useLegacyAshoatKeyserverCall(uploadMultimedia);
const callBlobServiceUpload = useBlobServiceUpload();
const callSendMultimediaMessage = useSendMultimediaMessage();
const callSendTextMessage = useSendTextMessage();
diff --git a/native/navigation/deep-links-context-provider.react.js b/native/navigation/deep-links-context-provider.react.js
--- a/native/navigation/deep-links-context-provider.react.js
+++ b/native/navigation/deep-links-context-provider.react.js
@@ -16,7 +16,7 @@
} from 'lib/facts/links.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
import type { SetState } from 'lib/types/hook-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import {
@@ -82,7 +82,7 @@
const loggedIn = useSelector(isLoggedIn);
const dispatchActionPromise = useDispatchActionPromise();
- const validateLink = useServerCall(verifyInviteLink);
+ const validateLink = useLegacyAshoatKeyserverCall(verifyInviteLink);
const navigation = useNavigation();
React.useEffect(() => {
void (async () => {
diff --git a/native/profile/edit-password.react.js b/native/profile/edit-password.react.js
--- a/native/profile/edit-password.react.js
+++ b/native/profile/edit-password.react.js
@@ -18,7 +18,7 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { PasswordUpdate } from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -355,7 +355,7 @@
const styles = useStyles(unboundStyles);
const dispatchActionPromise = useDispatchActionPromise();
- const callChangeKeyserverUserPassword = useServerCall(
+ const callChangeKeyserverUserPassword = useLegacyAshoatKeyserverCall(
changeKeyserverUserPassword,
);
diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js
--- a/native/profile/relationship-list-item.react.js
+++ b/native/profile/relationship-list-item.react.js
@@ -22,7 +22,7 @@
AccountUserInfo,
GlobalAccountUserInfo,
} from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -331,7 +331,8 @@
const colors = useColors();
const styles = useStyles(unboundStyles);
const dispatchActionPromise = useDispatchActionPromise();
- const boundUpdateRelationships = useServerCall(updateRelationships);
+ const boundUpdateRelationships =
+ useLegacyAshoatKeyserverCall(updateRelationships);
const overlayContext = React.useContext(OverlayContext);
const keyboardState = React.useContext(KeyboardContext);
diff --git a/native/profile/relationship-list.react.js b/native/profile/relationship-list.react.js
--- a/native/profile/relationship-list.react.js
+++ b/native/profile/relationship-list.react.js
@@ -22,7 +22,7 @@
GlobalAccountUserInfo,
AccountUserInfo,
} from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -199,7 +199,8 @@
tagInputRef.current?.focus();
}, []);
- const callUpdateRelationships = useServerCall(updateRelationships);
+ const callUpdateRelationships =
+ useLegacyAshoatKeyserverCall(updateRelationships);
const updateRelationshipsOnServer = React.useCallback(async () => {
const action = {
[FriendListRouteName]: relationshipActions.FRIEND,
diff --git a/native/profile/user-relationship-tooltip-modal.react.js b/native/profile/user-relationship-tooltip-modal.react.js
--- a/native/profile/user-relationship-tooltip-modal.react.js
+++ b/native/profile/user-relationship-tooltip-modal.react.js
@@ -9,7 +9,7 @@
} from 'lib/actions/relationship-actions.js';
import { stringForUser } from 'lib/shared/user-utils.js';
import type { RelativeUserInfo } from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import PencilIcon from '../components/pencil-icon.react.js';
@@ -38,7 +38,8 @@
+action: Action,
};
function useRelationshipAction(input: OnRemoveUserProps) {
- const boundRemoveRelationships = useServerCall(updateRelationships);
+ const boundRemoveRelationships =
+ useLegacyAshoatKeyserverCall(updateRelationships);
const dispatchActionPromise = useDispatchActionPromise();
const userText = stringForUser(input.relativeUserInfo);
diff --git a/web/account/siwe-login-form.react.js b/web/account/siwe-login-form.react.js
--- a/web/account/siwe-login-form.react.js
+++ b/web/account/siwe-login-form.react.js
@@ -23,7 +23,7 @@
LogInExtraInfo,
} from 'lib/types/account-types.js';
import type { OLMIdentityKeys } from 'lib/types/crypto-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { ServerError } from 'lib/utils/errors.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
@@ -56,12 +56,12 @@
const { address } = useAccount();
const { data: signer } = useWalletClient();
const dispatchActionPromise = useDispatchActionPromise();
- const getSIWENonceCall = useServerCall(getSIWENonce);
+ const getSIWENonceCall = useLegacyAshoatKeyserverCall(getSIWENonce);
const getSIWENonceCallLoadingStatus = useSelector(
getSIWENonceLoadingStatusSelector,
);
const siweAuthLoadingStatus = useSelector(siweAuthLoadingStatusSelector);
- const siweAuthCall = useServerCall(siweAuth);
+ const siweAuthCall = useLegacyAshoatKeyserverCall(siweAuth);
const logInExtraInfo = useSelector(logInExtraInfoSelector);
const [siweNonce, setSIWENonce] = React.useState<?string>(null);
diff --git a/web/avatars/avatar-hooks.react.js b/web/avatars/avatar-hooks.react.js
--- a/web/avatars/avatar-hooks.react.js
+++ b/web/avatars/avatar-hooks.react.js
@@ -7,7 +7,7 @@
useBlobServiceUpload,
} from 'lib/actions/upload-actions.js';
import type { UpdateUserAvatarRequest } from 'lib/types/avatar-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
import { encryptFile } from '../media/encryption-utils.js';
@@ -18,7 +18,7 @@
const useBlobServiceUploads = false;
function useUploadAvatarMedia(): File => Promise<UpdateUserAvatarRequest> {
- const callUploadMultimedia = useServerCall(uploadMultimedia);
+ const callUploadMultimedia = useLegacyAshoatKeyserverCall(uploadMultimedia);
const callBlobServiceUpload = useBlobServiceUpload();
const uploadAvatarMedia = React.useCallback(
async (file: File): Promise<UpdateUserAvatarRequest> => {
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -81,7 +81,7 @@
type NewThreadResult,
type ThreadInfo,
} from 'lib/types/thread-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import {
makeBlobServiceEndpointURL,
isBlobServiceURI,
@@ -1651,7 +1651,7 @@
pendingToRealizedThreadIDsSelector(state.threadStore.threadInfos),
);
const calendarQuery = useSelector(nonThreadCalendarQuery);
- const callUploadMultimedia = useServerCall(uploadMultimedia);
+ const callUploadMultimedia = useLegacyAshoatKeyserverCall(uploadMultimedia);
const callBlobServiceUpload = useBlobServiceUpload();
const callDeleteUpload = useDeleteUpload();
const callSendMultimediaMessage = useLegacySendMultimediaMessage();
diff --git a/web/invite-links/invite-link-handler.react.js b/web/invite-links/invite-link-handler.react.js
--- a/web/invite-links/invite-link-handler.react.js
+++ b/web/invite-links/invite-link-handler.react.js
@@ -8,7 +8,7 @@
} from 'lib/actions/link-actions.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
@@ -22,7 +22,7 @@
const dispatchActionPromise = useDispatchActionPromise();
const dispatch = useDispatch();
- const validateLink = useServerCall(verifyInviteLink);
+ const validateLink = useLegacyAshoatKeyserverCall(verifyInviteLink);
const { pushModal } = useModalContext();
React.useEffect(() => {
if (!inviteSecret || !loggedIn) {
diff --git a/web/modals/terms-and-privacy-modal.react.js b/web/modals/terms-and-privacy-modal.react.js
--- a/web/modals/terms-and-privacy-modal.react.js
+++ b/web/modals/terms-and-privacy-modal.react.js
@@ -8,7 +8,7 @@
} from 'lib/actions/user-actions.js';
import { policyTypes } from 'lib/facts/policies.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { acknowledgePolicy } from 'lib/utils/policy-acknowledge-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -27,7 +27,8 @@
function TermsAndPrivacyModal(): React.Node {
const loading = useSelector(loadingStatusSelector);
const [acknowledgmentError, setAcknowledgmentError] = React.useState('');
- const sendAcknowledgmentRequest = useServerCall(policyAcknowledgment);
+ const sendAcknowledgmentRequest =
+ useLegacyAshoatKeyserverCall(policyAcknowledgment);
const dispatchActionPromise = useDispatchActionPromise();
const onAccept = React.useCallback(() => {
diff --git a/web/modals/threads/settings/thread-settings-relationship-button.react.js b/web/modals/threads/settings/thread-settings-relationship-button.react.js
--- a/web/modals/threads/settings/thread-settings-relationship-button.react.js
+++ b/web/modals/threads/settings/thread-settings-relationship-button.react.js
@@ -24,7 +24,7 @@
type RelationshipButton,
} from 'lib/types/relationship-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './thread-settings-relationship-tab.css';
@@ -104,7 +104,8 @@
}, [relationshipButton]);
const dispatchActionPromise = useDispatchActionPromise();
- const callUpdateRelationships = useServerCall(updateRelationships);
+ const callUpdateRelationships =
+ useLegacyAshoatKeyserverCall(updateRelationships);
const updateRelationshipsActionPromise = React.useCallback(async () => {
try {
diff --git a/web/settings/password-change-modal.js b/web/settings/password-change-modal.js
--- a/web/settings/password-change-modal.js
+++ b/web/settings/password-change-modal.js
@@ -11,7 +11,7 @@
import { useStringForUser } from 'lib/hooks/ens-cache.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { type PasswordUpdate } from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
@@ -241,7 +241,7 @@
state =>
changeKeyserverUserPasswordLoadingStatusSelector(state) === 'loading',
);
- const callChangeKeyserverUserPassword = useServerCall(
+ const callChangeKeyserverUserPassword = useLegacyAshoatKeyserverCall(
changeKeyserverUserPassword,
);
const dispatchActionPromise = useDispatchActionPromise();
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -18,7 +18,7 @@
GlobalAccountUserInfo,
AccountUserInfo,
} from 'lib/types/user-types.js';
-import { useServerCall } from 'lib/utils/action-utils.js';
+import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -187,7 +187,8 @@
);
const [errorMessage, setErrorMessage] = React.useState('');
- const callUpdateRelationships = useServerCall(updateRelationships);
+ const callUpdateRelationships =
+ useLegacyAshoatKeyserverCall(updateRelationships);
const dispatchActionPromise = useDispatchActionPromise();
const updateRelationshipsPromiseCreator = React.useCallback(async () => {
try {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 5:48 PM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605728
Default Alt Text
D10689.diff (28 KB)
Attached To
Mode
D10689: [lib][web][native] Rename useServerCall to useLegacyAshoatKeyserverCall
Attached
Detach File
Event Timeline
Log In to Comment