Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3366247
D13938.id45829.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13938.id45829.diff
View Options
diff --git a/lib/hooks/relationship-hooks.js b/lib/hooks/relationship-hooks.js
--- a/lib/hooks/relationship-hooks.js
+++ b/lib/hooks/relationship-hooks.js
@@ -4,7 +4,7 @@
import uuid from 'uuid';
import { useNewThickThread } from './thread-hooks.js';
-import { useFindUserIdentities } from '../actions/find-user-identities-actions.js';
+import { useUsersSupportThickThreads } from './user-identities-hooks.js';
import { updateRelationships as serverUpdateRelationships } from '../actions/relationship-actions.js';
import { useLegacyAshoatKeyserverCall } from '../keyserver-conn/legacy-keyserver-call.js';
import { pendingToRealizedThreadIDsSelector } from '../selectors/thread-selectors.js';
@@ -87,7 +87,7 @@
);
const createNewThickThread = useNewThickThread();
- const findUserIdentities = useFindUserIdentities();
+ const filterUsersSupportingThickThreads = useUsersSupportThickThreads();
const updateRelationshipsAndSendRobotext = React.useCallback(
async (action: RelationshipAction, userIDs: $ReadOnlyArray<string>) => {
@@ -97,10 +97,11 @@
);
return {};
}
- const { identities } = await findUserIdentities(userIDs);
+ const usersSupportingThickThreads =
+ await filterUsersSupportingThickThreads(userIDs);
const planForUsers = new Map<string, RobotextPlanForUser>();
for (const userID of userIDs) {
- if (!identities[userID]) {
+ if (!usersSupportingThickThreads.has(userID)) {
planForUsers.set(userID, { plan: 'send_to_thin_thread' });
continue;
}
@@ -219,7 +220,7 @@
[
viewerID,
updateRelationships,
- findUserIdentities,
+ filterUsersSupportingThickThreads,
pendingToRealizedThreadIDs,
sendRobotextToThickThread,
userInfos,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 10:21 AM (20 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580130
Default Alt Text
D13938.id45829.diff (1 KB)
Attached To
Mode
D13938: [lib] Use useUsersSupportThickThreads() (with auxUserInfos) in useUpdateRelationships()
Attached
Detach File
Event Timeline
Log In to Comment