Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3358889
D11609.id39249.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D11609.id39249.diff
View Options
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
@@ -10,8 +10,8 @@
import { getSingleOtherUser } from '../shared/thread-utils.js';
import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
import {
- type RelationshipAction,
relationshipActions,
+ type TraditionalRelationshipAction,
} from '../types/relationship-types.js';
import type { UserInfo } from '../types/user-types.js';
import { useLegacyAshoatKeyserverCall } from '../utils/action-utils.js';
@@ -70,7 +70,7 @@
serverUpdateRelationships,
);
const updateRelationship = React.useCallback(
- async (action: RelationshipAction) => {
+ async (action: TraditionalRelationshipAction) => {
try {
invariant(otherUserID, 'Other user info id should be present');
return await callUpdateRelationships({
@@ -87,7 +87,7 @@
const dispatchActionPromise = useDispatchActionPromise();
const onButtonPress = React.useCallback(
- (action: RelationshipAction) => {
+ (action: TraditionalRelationshipAction) => {
void dispatchActionPromise(
updateRelationshipsActionTypes,
updateRelationship(action),
diff --git a/lib/shared/relationship-utils.js b/lib/shared/relationship-utils.js
--- a/lib/shared/relationship-utils.js
+++ b/lib/shared/relationship-utils.js
@@ -8,7 +8,7 @@
userRelationshipStatus,
relationshipButtons,
relationshipActions,
- type RelationshipAction,
+ type TraditionalRelationshipAction,
} from '../types/relationship-types.js';
import type { UserInfo } from '../types/user-types.js';
@@ -67,7 +67,7 @@
// eslint-disable-next-line consistent-return
function getRelationshipDispatchAction(
relationshipButton: RelationshipButton,
-): RelationshipAction {
+): TraditionalRelationshipAction {
if (relationshipButton === relationshipButtons.BLOCK) {
return relationshipActions.BLOCK;
} else if (
diff --git a/lib/types/relationship-types.js b/lib/types/relationship-types.js
--- a/lib/types/relationship-types.js
+++ b/lib/types/relationship-types.js
@@ -68,7 +68,7 @@
export type RelationshipButton = $Values<typeof relationshipButtons>;
export type TraditionalRelationshipRequest = {
- +action: RelationshipAction,
+ +action: TraditionalRelationshipAction,
+userIDs: $ReadOnlyArray<string>,
};
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
@@ -16,7 +16,7 @@
import { getSingleOtherUser } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import {
- type RelationshipAction,
+ type TraditionalRelationshipAction,
type RelationshipButton,
} from 'lib/types/relationship-types.js';
import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
@@ -53,7 +53,7 @@
serverUpdateRelationships,
);
const updateRelationship = React.useCallback(
- async (action: RelationshipAction) => {
+ async (action: TraditionalRelationshipAction) => {
try {
return await callUpdateRelationships({
action,
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
@@ -12,7 +12,7 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { ReactRef } from 'lib/types/react-types.js';
import {
- type RelationshipAction,
+ type TraditionalRelationshipAction,
type RelationshipErrors,
userRelationshipStatus,
relationshipActions,
@@ -292,7 +292,7 @@
this.onPressUpdateFriendship(relationshipActions.UNFRIEND);
};
- onPressUpdateFriendship(action: RelationshipAction) {
+ onPressUpdateFriendship(action: TraditionalRelationshipAction) {
const { id } = this.props.userInfo;
const customKeyName = `${updateRelationshipsActionTypes.started}:${id}`;
void this.props.dispatchActionPromise(
@@ -303,7 +303,7 @@
}
async updateFriendship(
- action: RelationshipAction,
+ action: TraditionalRelationshipAction,
): Promise<RelationshipErrors> {
try {
return await this.props.updateRelationships({
diff --git a/web/settings/relationship/add-users-list-modal.react.js b/web/settings/relationship/add-users-list-modal.react.js
--- a/web/settings/relationship/add-users-list-modal.react.js
+++ b/web/settings/relationship/add-users-list-modal.react.js
@@ -10,7 +10,7 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type {
UserRelationshipStatus,
- RelationshipAction,
+ TraditionalRelationshipAction,
} from 'lib/types/relationship-types.js';
import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -64,7 +64,7 @@
+excludedStatuses: $ReadOnlySet<UserRelationshipStatus>,
+confirmButtonContent: React.Node,
+confirmButtonColor?: ButtonColor,
- +relationshipAction: RelationshipAction,
+ +relationshipAction: TraditionalRelationshipAction,
};
function AddUsersListModal(props: Props): React.Node {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 6:32 AM (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578598
Default Alt Text
D11609.id39249.diff (5 KB)
Attached To
Mode
D11609: [lib] Narrow `TraditionalRelationshipRequest` to exclude 'farcaster' action
Attached
Detach File
Event Timeline
Log In to Comment