Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3513302
D13938.id46376.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.id46376.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
Sun, Dec 22, 11:34 PM (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689758
Default Alt Text
D13938.id46376.diff (1 KB)
Attached To
Mode
D13938: [lib] Use useUsersSupportThickThreads() (with auxUserInfos) in useUpdateRelationships()
Attached
Detach File
Event Timeline
Log In to Comment