Page MenuHomePhabricator

D13938.id46376.diff
No OneTemporary

D13938.id46376.diff

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

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)

Event Timeline