Page MenuHomePhabricator

D12482.id41720.diff
No OneTemporary

D12482.id41720.diff

diff --git a/keyserver/src/bots/commbot.js b/keyserver/src/bots/commbot.js
--- a/keyserver/src/bots/commbot.js
+++ b/keyserver/src/bots/commbot.js
@@ -13,7 +13,7 @@
async function createCommbotThread(userID: string): Promise<string> {
const commbotViewer = createBotViewer(commbot.userID);
const newThreadRequest = {
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
initialMemberIDs: [userID],
};
const result = await createThread(commbotViewer, newThreadRequest, {
diff --git a/keyserver/src/creators/account-creator.js b/keyserver/src/creators/account-creator.js
--- a/keyserver/src/creators/account-creator.js
+++ b/keyserver/src/creators/account-creator.js
@@ -200,7 +200,7 @@
createThread(
viewer,
{
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
initialMemberIDs: [admin.id],
},
{ forceAddMembers: true },
diff --git a/keyserver/src/creators/thread-creator.js b/keyserver/src/creators/thread-creator.js
--- a/keyserver/src/creators/thread-creator.js
+++ b/keyserver/src/creators/thread-creator.js
@@ -92,7 +92,7 @@
const threadType = request.type;
const shouldCreateRelationships =
- forceAddMembers || threadType === threadTypes.PERSONAL;
+ forceAddMembers || threadType === threadTypes.GENESIS_PERSONAL;
let parentThreadID = request.parentThreadID ? request.parentThreadID : null;
const initialMemberIDsFromRequest =
request.initialMemberIDs && request.initialMemberIDs.length > 0
@@ -120,7 +120,7 @@
}
if (
- threadType === threadTypes.PERSONAL &&
+ threadType === threadTypes.GENESIS_PERSONAL &&
request.initialMemberIDs?.length !== 1
) {
throw new ServerError('invalid_parameters');
@@ -219,7 +219,7 @@
let color = request.color
? request.color.toLowerCase()
: generateRandomColor();
- if (threadType === threadTypes.PERSONAL) {
+ if (threadType === threadTypes.GENESIS_PERSONAL) {
color = generatePendingThreadColor([
...(request.initialMemberIDs ?? []),
viewer.id,
@@ -244,11 +244,11 @@
];
let existingThreadQuery = null;
- if (threadType === threadTypes.PERSONAL) {
+ if (threadType === threadTypes.GENESIS_PERSONAL) {
const otherMemberID = initialMemberIDs?.[0];
invariant(
otherMemberID,
- 'Other member id should be set for a PERSONAL thread',
+ 'Other member id should be set for a GENESIS_PERSONAL thread',
);
existingThreadQuery = personalThreadQuery(viewer.userID, otherMemberID);
} else if (sourceMessageID) {
@@ -298,7 +298,7 @@
let joinUpdateInfos: $ReadOnlyArray<ServerUpdateInfo> = [];
let userInfos: UserInfos = {};
let newMessageInfos: $ReadOnlyArray<RawMessageInfo> = [];
- if (threadType !== threadTypes.PERSONAL) {
+ if (threadType !== threadTypes.GENESIS_PERSONAL) {
const joinThreadResult = await joinThread(viewer, {
threadID: existingThreadID,
calendarQuery,
@@ -515,7 +515,7 @@
return createThread(
viewer,
{
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
description: privateThreadDescription,
ghostMemberIDs: [commbot.userID],
},
diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js
--- a/keyserver/src/database/migration-config.js
+++ b/keyserver/src/database/migration-config.js
@@ -451,7 +451,7 @@
FROM threads t
INNER JOIN memberships m ON m.thread = t.id AND m.role > 0
INNER JOIN users u ON u.id = m.user
- WHERE t.type = ${threadTypes.PRIVATE}
+ WHERE t.type = ${threadTypes.GENESIS_PRIVATE}
AND t.name = u.ethereum_address
`);
const threadIDs = result.map(({ id }) => id.toString());
diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js
--- a/keyserver/src/fetchers/thread-fetchers.js
+++ b/keyserver/src/fetchers/thread-fetchers.js
@@ -392,7 +392,7 @@
ON m1.thread = t.id AND m1.user = ${firstMemberID}
INNER JOIN memberships m2
ON m2.thread = t.id AND m2.user = ${secondMemberID}
- WHERE t.type = ${threadTypes.PERSONAL}
+ WHERE t.type = ${threadTypes.GENESIS_PERSONAL}
AND m1.role > 0
AND m2.role > 0
`;
diff --git a/keyserver/src/responders/thread-responders.js b/keyserver/src/responders/thread-responders.js
--- a/keyserver/src/responders/thread-responders.js
+++ b/keyserver/src/responders/thread-responders.js
@@ -154,7 +154,7 @@
type: tNumEnum([
threadTypes.COMMUNITY_OPEN_SUBTHREAD,
threadTypes.COMMUNITY_SECRET_SUBTHREAD,
- threadTypes.PERSONAL,
+ threadTypes.GENESIS_PERSONAL,
threadTypes.LOCAL,
threadTypes.COMMUNITY_ROOT,
threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT,
diff --git a/keyserver/src/scripts/add-leave-thread-permissions.js b/keyserver/src/scripts/add-leave-thread-permissions.js
--- a/keyserver/src/scripts/add-leave-thread-permissions.js
+++ b/keyserver/src/scripts/add-leave-thread-permissions.js
@@ -24,7 +24,7 @@
UPDATE roles r
LEFT JOIN threads t ON t.id = r.thread
SET r.permissions = JSON_SET(permissions, ${leaveThreadString}, TRUE)
- WHERE t.type != ${threadTypes.PERSONAL}
+ WHERE t.type != ${threadTypes.GENESIS_PERSONAL}
`;
await dbQuery(updateAllRoles);
}
diff --git a/keyserver/src/updaters/relationship-updaters.js b/keyserver/src/updaters/relationship-updaters.js
--- a/keyserver/src/updaters/relationship-updaters.js
+++ b/keyserver/src/updaters/relationship-updaters.js
@@ -68,8 +68,8 @@
// We have to create personal threads before setting the relationship
// status. By doing that we make sure that failed thread creation is
// reported to the caller and can be repeated - there should be only
- // one PERSONAL thread per a pair of users and we can safely call it
- // repeatedly.
+ // one GENESIS_PERSONAL thread per a pair of users and we can safely
+ // call it repeatedly.
const threadIDPerUser = await createPersonalThreads(
viewer,
request,
@@ -214,8 +214,8 @@
// We have to create personal threads before setting the relationship
// status. By doing that we make sure that failed thread creation is
// reported to the caller and can be repeated - there should be only
- // one PERSONAL thread per a pair of users and we can safely call it
- // repeatedly.
+ // one GENESIS_PERSONAL thread per a pair of users and we can safely
+ // call it repeatedly.
const threadIDPerUser = await createPersonalThreads(
viewer,
request,
@@ -377,7 +377,7 @@
invariant(
request.action === relationshipActions.FRIEND ||
request.action === relationshipActions.FARCASTER_MUTUAL,
- 'We should only create a PERSONAL threads when sending FRIEND or ' +
+ 'We should only create a GENESIS_PERSONAL threads when sending FRIEND or ' +
'FARCASTER_MUTUAL requests, but we tried to do that for ' +
request.action,
);
@@ -391,7 +391,7 @@
ON m1.thread = t.id AND m1.user = ${viewer.userID}
INNER JOIN memberships m2
ON m2.thread = t.id AND m2.user IN (${userIDs})
- WHERE t.type = ${threadTypes.PERSONAL}
+ WHERE t.type = ${threadTypes.GENESIS_PERSONAL}
AND m1.role > 0
AND m2.role > 0
`;
@@ -410,7 +410,7 @@
threadCreationPromises[userID] = createThread(
viewer,
{
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
initialMemberIDs: [userID],
},
{ forceAddMembers: true, updatesForCurrentSession: 'broadcast' },
diff --git a/lib/components/chat-mention-provider.react.js b/lib/components/chat-mention-provider.react.js
--- a/lib/components/chat-mention-provider.react.js
+++ b/lib/components/chat-mention-provider.react.js
@@ -167,8 +167,8 @@
lastThreadInTraversePath.id;
}
if (
- lastThreadInTraversePath.type !== threadTypes.PERSONAL &&
- lastThreadInTraversePath.type !== threadTypes.PRIVATE
+ lastThreadInTraversePath.type !== threadTypes.GENESIS_PERSONAL &&
+ lastThreadInTraversePath.type !== threadTypes.GENESIS_PRIVATE
) {
result[genesis().id][lastThreadInTraversePath.id] = {
threadInfo: lastThreadInTraversePath,
diff --git a/lib/permissions/minimally-encoded-thread-permissions-test-data.js b/lib/permissions/minimally-encoded-thread-permissions-test-data.js
--- a/lib/permissions/minimally-encoded-thread-permissions-test-data.js
+++ b/lib/permissions/minimally-encoded-thread-permissions-test-data.js
@@ -6,7 +6,7 @@
const exampleRawThreadInfoA: LegacyRawThreadInfo = {
id: '85171',
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
name: '',
description: '',
color: '6d49ab',
@@ -321,7 +321,7 @@
const exampleMinimallyEncodedRawThreadInfoA: RawThreadInfo = {
minimallyEncoded: true,
id: '85171',
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
name: '',
description: '',
color: '6d49ab',
@@ -383,7 +383,7 @@
const expectedDecodedExampleRawThreadInfoA: LegacyRawThreadInfo = {
id: '85171',
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
name: '',
description: '',
color: '6d49ab',
diff --git a/lib/permissions/special-roles.test.js b/lib/permissions/special-roles.test.js
--- a/lib/permissions/special-roles.test.js
+++ b/lib/permissions/special-roles.test.js
@@ -143,7 +143,7 @@
},
'256|83814': {
id: '256|83814',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description:
'This is your private chat, where you can set reminders and jot notes in private!',
diff --git a/lib/permissions/thread-permissions.js b/lib/permissions/thread-permissions.js
--- a/lib/permissions/thread-permissions.js
+++ b/lib/permissions/thread-permissions.js
@@ -373,7 +373,7 @@
const openDescendantVisible = OPEN_DESCENDANT + threadPermissions.VISIBLE;
const openChildJoinThread = OPEN_CHILD + threadPermissions.JOIN_THREAD;
- if (threadType === threadTypes.PRIVATE) {
+ if (threadType === threadTypes.GENESIS_PRIVATE) {
const memberPermissions = {
[threadPermissions.KNOW_OF]: true,
[threadPermissions.VISIBLE]: true,
@@ -393,7 +393,7 @@
};
}
- if (threadType === threadTypes.PERSONAL) {
+ if (threadType === threadTypes.GENESIS_PERSONAL) {
return {
Members: {
[threadPermissions.KNOW_OF]: true,
diff --git a/lib/selectors/user-selectors.js b/lib/selectors/user-selectors.js
--- a/lib/selectors/user-selectors.js
+++ b/lib/selectors/user-selectors.js
@@ -172,7 +172,7 @@
for (const threadID in threadInfos) {
const thread = threadInfos[threadID];
if (
- thread.type !== threadTypes.PERSONAL ||
+ thread.type !== threadTypes.GENESIS_PERSONAL ||
!thread.members.find(member => member.id === viewerID)
) {
continue;
diff --git a/lib/shared/avatar-utils.js b/lib/shared/avatar-utils.js
--- a/lib/shared/avatar-utils.js
+++ b/lib/shared/avatar-utils.js
@@ -276,14 +276,14 @@
viewerID: ?string,
userInfos: UserInfos,
): ClientAvatar {
- if (threadInfo.type === threadTypes.PRIVATE) {
- invariant(viewerID, 'viewerID should be set for PRIVATE threads');
+ if (threadInfo.type === threadTypes.GENESIS_PRIVATE) {
+ invariant(viewerID, 'viewerID should be set for GENESIS_PRIVATE threads');
return getAvatarForUser(userInfos[viewerID]);
}
invariant(
- threadInfo.type === threadTypes.PERSONAL,
- 'threadInfo should be a PERSONAL type',
+ threadInfo.type === threadTypes.GENESIS_PERSONAL,
+ 'threadInfo should be a GENESIS_PERSONAL type',
);
const memberInfos = threadOtherMembers(threadInfo.members, viewerID)
diff --git a/lib/shared/sidebar-utils.js b/lib/shared/sidebar-utils.js
--- a/lib/shared/sidebar-utils.js
+++ b/lib/shared/sidebar-utils.js
@@ -80,7 +80,7 @@
}
const singleOtherUser = getSingleOtherUser(parentThreadInfo, viewerID);
- if (parentThreadType === threadTypes.PERSONAL && singleOtherUser) {
+ if (parentThreadType === threadTypes.GENESIS_PERSONAL && singleOtherUser) {
const singleOtherUsername = parentThreadInfo.members.find(
member => member.id === singleOtherUser,
)?.username;
diff --git a/lib/shared/state-sync/threads-state-sync-spec.test.js b/lib/shared/state-sync/threads-state-sync-spec.test.js
--- a/lib/shared/state-sync/threads-state-sync-spec.test.js
+++ b/lib/shared/state-sync/threads-state-sync-spec.test.js
@@ -15,7 +15,7 @@
'256|84459': {
minimallyEncoded: true,
id: '256|84459',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
@@ -44,7 +44,7 @@
'256|84459': {
minimallyEncoded: true,
id: '256|84459',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
@@ -70,7 +70,7 @@
'256|123': {
minimallyEncoded: true,
id: '256|123',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
@@ -117,7 +117,7 @@
'256|84459': {
minimallyEncoded: true,
id: '256|84459',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
@@ -146,7 +146,7 @@
'256|84459': {
minimallyEncoded: true,
id: '256|84459',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
@@ -172,7 +172,7 @@
'123|123': {
minimallyEncoded: true,
id: '123|123',
- type: threadTypes.PRIVATE,
+ type: threadTypes.GENESIS_PRIVATE,
name: '',
description: '',
color: 'b8753d',
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
@@ -525,7 +525,7 @@
const threadInfo = createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PERSONAL,
+ threadType: threadTypes.GENESIS_PERSONAL,
members: [loggedInUserInfo, pendingPersonalThreadUserInfo],
});
@@ -605,9 +605,9 @@
function pendingThreadType(numberOfOtherMembers: number): 4 | 6 | 7 {
if (numberOfOtherMembers === 0) {
- return threadTypes.PRIVATE;
+ return threadTypes.GENESIS_PRIVATE;
} else if (numberOfOtherMembers === 1) {
- return threadTypes.PERSONAL;
+ return threadTypes.GENESIS_PERSONAL;
} else {
return threadTypes.LOCAL;
}
@@ -615,10 +615,10 @@
function threadTypeCanBePending(threadType: ThreadType): boolean {
return (
- threadType === threadTypes.PERSONAL ||
+ threadType === threadTypes.GENESIS_PERSONAL ||
threadType === threadTypes.LOCAL ||
threadType === threadTypes.SIDEBAR ||
- threadType === threadTypes.PRIVATE
+ threadType === threadTypes.GENESIS_PRIVATE
);
}
@@ -829,7 +829,7 @@
display: 'uiName',
uiName: memberEntities,
ifJustViewer:
- threadInfo.type === threadTypes.PRIVATE
+ threadInfo.type === threadTypes.GENESIS_PRIVATE
? 'viewer_username'
: 'just_you_string',
};
@@ -870,8 +870,8 @@
if (avatar) {
threadInfo = { ...threadInfo, avatar };
} else if (
- rawThreadInfo.type === threadTypes.PERSONAL ||
- rawThreadInfo.type === threadTypes.PRIVATE
+ rawThreadInfo.type === threadTypes.GENESIS_PERSONAL ||
+ rawThreadInfo.type === threadTypes.GENESIS_PRIVATE
) {
threadInfo = {
...threadInfo,
@@ -1132,11 +1132,11 @@
threadType === threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD
) {
return 'Open';
- } else if (threadType === threadTypes.PERSONAL) {
+ } else if (threadType === threadTypes.GENESIS_PERSONAL) {
return 'Personal';
} else if (threadType === threadTypes.SIDEBAR) {
return 'Thread';
- } else if (threadType === threadTypes.PRIVATE) {
+ } else if (threadType === threadTypes.GENESIS_PRIVATE) {
return 'Private';
} else if (
threadType === threadTypes.COMMUNITY_ROOT ||
@@ -1239,8 +1239,8 @@
threadType === threadTypes.COMMUNITY_ROOT ||
threadType === threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT ||
threadType === threadTypes.GENESIS ||
- threadType === threadTypes.PERSONAL ||
- threadType === threadTypes.PRIVATE
+ threadType === threadTypes.GENESIS_PERSONAL ||
+ threadType === threadTypes.GENESIS_PRIVATE
) {
return 'disabled';
} else {
@@ -1331,9 +1331,9 @@
if (!threadSearchResults.has(item.threadInfo.id)) {
continue;
}
- if (item.threadInfo.type === threadTypes.PRIVATE) {
+ if (item.threadInfo.type === threadTypes.GENESIS_PRIVATE) {
privateThreads.push({ ...item, sidebars: [] });
- } else if (item.threadInfo.type === threadTypes.PERSONAL) {
+ } else if (item.threadInfo.type === threadTypes.GENESIS_PERSONAL) {
personalThreads.push({ ...item, sidebars: [] });
} else {
otherThreads.push({ ...item, sidebars: [] });
@@ -1367,9 +1367,9 @@
if (!threadSearchResultsSet.has(threadInfo.id)) {
continue;
}
- if (threadInfo.type === threadTypes.PRIVATE) {
+ if (threadInfo.type === threadTypes.GENESIS_PRIVATE) {
privateThreads.push(threadInfo);
- } else if (threadInfo.type === threadTypes.PERSONAL) {
+ } else if (threadInfo.type === threadTypes.GENESIS_PERSONAL) {
personalThreads.push(threadInfo);
} else {
otherThreads.push(threadInfo);
@@ -1578,12 +1578,12 @@
const isViewerProfile = loggedInUserInfo?.id === userID;
const privateThreadInfosSelector = threadInfosSelectorForThreadType(
- threadTypes.PRIVATE,
+ threadTypes.GENESIS_PRIVATE,
);
const privateThreadInfos = useSelector(privateThreadInfosSelector);
const personalThreadInfosSelector = threadInfosSelectorForThreadType(
- threadTypes.PERSONAL,
+ threadTypes.GENESIS_PERSONAL,
);
const personalThreadInfos = useSelector(personalThreadInfosSelector);
diff --git a/lib/shared/thread-utils.test.js b/lib/shared/thread-utils.test.js
--- a/lib/shared/thread-utils.test.js
+++ b/lib/shared/thread-utils.test.js
@@ -32,7 +32,7 @@
it('should return correct data for real pending sidebar ID', () => {
const pendingPersonalResult = {
- threadType: threadTypes.PERSONAL,
+ threadType: threadTypes.GENESIS_PERSONAL,
memberIDs: ['83810', '86622'],
sourceMessageID: null,
};
diff --git a/lib/types/thread-types-enum.js b/lib/types/thread-types-enum.js
--- a/lib/types/thread-types-enum.js
+++ b/lib/types/thread-types-enum.js
@@ -14,9 +14,11 @@
// all members of parent
SIDEBAR: 5,
// canonical thread for each pair of users. represents the friendship
- PERSONAL: 6,
+ // created under GENESIS. being deprecated in favor of PERSONAL
+ GENESIS_PERSONAL: 6,
// canonical thread for each single user
- PRIVATE: 7,
+ // created under GENESIS. being deprecated in favor of PRIVATE
+ GENESIS_PRIVATE: 7,
// local "thick" thread (outside of community). no parent, can only have
// sidebar children. currently a proxy for COMMUNITY_SECRET_SUBTHREAD until we
// launch actual E2E
diff --git a/lib/types/validation.test.js b/lib/types/validation.test.js
--- a/lib/types/validation.test.js
+++ b/lib/types/validation.test.js
@@ -343,7 +343,7 @@
const thread = {
id: '85171',
- type: threadTypes.PERSONAL,
+ type: threadTypes.GENESIS_PERSONAL,
name: '',
description: '',
color: '6d49ab',
diff --git a/lib/utils/entity-text.js b/lib/utils/entity-text.js
--- a/lib/utils/entity-text.js
+++ b/lib/utils/entity-text.js
@@ -323,7 +323,7 @@
let { name } = entity;
if (!name || entity.alwaysDisplayShortName) {
- const threadType = entity.threadType ?? threadTypes.PERSONAL;
+ const threadType = entity.threadType ?? threadTypes.GENESIS_PERSONAL;
const { parentThreadID } = entity;
const noun = entity.subchannel
? 'subchannel'
diff --git a/native/avatars/thread-avatar.react.js b/native/avatars/thread-avatar.react.js
--- a/native/avatars/thread-avatar.react.js
+++ b/native/avatars/thread-avatar.react.js
@@ -31,9 +31,9 @@
);
let displayUserIDForThread;
- if (threadInfo.type === threadTypes.PRIVATE) {
+ if (threadInfo.type === threadTypes.GENESIS_PRIVATE) {
displayUserIDForThread = viewerID;
- } else if (threadInfo.type === threadTypes.PERSONAL) {
+ } else if (threadInfo.type === threadTypes.GENESIS_PERSONAL) {
displayUserIDForThread = getSingleOtherUser(threadInfo, viewerID);
}
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -137,7 +137,7 @@
}
const threadInfo = createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PRIVATE,
+ threadType: threadTypes.GENESIS_PRIVATE,
members: [loggedInUserInfo],
});
navigateToThread({ threadInfo, searching: true });
diff --git a/native/chat/compose-thread-button.react.js b/native/chat/compose-thread-button.react.js
--- a/native/chat/compose-thread-button.react.js
+++ b/native/chat/compose-thread-button.react.js
@@ -28,7 +28,7 @@
params: {
threadInfo: createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PRIVATE,
+ threadType: threadTypes.GENESIS_PRIVATE,
members: [loggedInUserInfo],
}),
searching: true,
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js
--- a/native/chat/message-list.react.js
+++ b/native/chat/message-list.react.js
@@ -219,7 +219,7 @@
const { messageListData, startReached } = this.props;
const footer = startReached ? this.ListFooterComponent : undefined;
let relationshipPrompt = null;
- if (this.props.threadInfo.type === threadTypes.PERSONAL) {
+ if (this.props.threadInfo.type === threadTypes.GENESIS_PERSONAL) {
relationshipPrompt = (
<RelationshipPrompt
pendingPersonalThreadUserInfo={
diff --git a/native/chat/settings/thread-settings.react.js b/native/chat/settings/thread-settings.react.js
--- a/native/chat/settings/thread-settings.react.js
+++ b/native/chat/settings/thread-settings.react.js
@@ -785,7 +785,8 @@
});
}
- const threadIsPersonal = threadInfo.type === threadTypes.PERSONAL;
+ const threadIsPersonal =
+ threadInfo.type === threadTypes.GENESIS_PERSONAL;
if (threadIsPersonal && viewerID) {
const otherMemberID = getSingleOtherUser(threadInfo, viewerID);
if (otherMemberID) {
diff --git a/native/components/thread-icon.react.js b/native/components/thread-icon.react.js
--- a/native/components/thread-icon.react.js
+++ b/native/components/thread-icon.react.js
@@ -28,7 +28,7 @@
style={styles.sidebarIcon}
/>
);
- } else if (threadType === threadTypes.PERSONAL) {
+ } else if (threadType === threadTypes.GENESIS_PERSONAL) {
return <SWMansionIcon name="users" size={18} color={color} />;
} else {
return <SWMansionIcon name="lock-on" size={18} color={color} />;
diff --git a/native/redux/edit-thread-permission-migration.js b/native/redux/edit-thread-permission-migration.js
--- a/native/redux/edit-thread-permission-migration.js
+++ b/native/redux/edit-thread-permission-migration.js
@@ -13,7 +13,7 @@
T: LegacyMemberInfo | LegacyThreadCurrentUserInfo,
>(threadInfo: LegacyRawThreadInfo, member: T, threadID: string): T {
let newPermissions = null;
- if (threadInfo.type === threadTypes.PRIVATE) {
+ if (threadInfo.type === threadTypes.GENESIS_PRIVATE) {
newPermissions = {
...member.permissions,
edit_thread_color: { value: true, source: threadID },
@@ -46,7 +46,7 @@
edit_thread_color: role.permissions['edit_thread'],
edit_thread_description: role.permissions['edit_thread'],
};
- } else if (threadType === threadTypes.PRIVATE) {
+ } else if (threadType === threadTypes.GENESIS_PRIVATE) {
updatedPermissions = {
...role.permissions,
edit_thread_color: true,
diff --git a/web/avatars/thread-avatar.react.js b/web/avatars/thread-avatar.react.js
--- a/web/avatars/thread-avatar.react.js
+++ b/web/avatars/thread-avatar.react.js
@@ -31,9 +31,9 @@
);
let displayUserIDForThread;
- if (threadInfo.type === threadTypes.PRIVATE) {
+ if (threadInfo.type === threadTypes.GENESIS_PRIVATE) {
displayUserIDForThread = viewerID;
- } else if (threadInfo.type === threadTypes.PERSONAL) {
+ } else if (threadInfo.type === threadTypes.GENESIS_PERSONAL) {
displayUserIDForThread = getSingleOtherUser(threadInfo, viewerID);
}
diff --git a/web/chat/chat-message-list.react.js b/web/chat/chat-message-list.react.js
--- a/web/chat/chat-message-list.react.js
+++ b/web/chat/chat-message-list.react.js
@@ -318,7 +318,7 @@
const messages = messageListData.map(this.renderItem);
let relationshipPrompt = null;
- if (threadInfo.type === threadTypes.PERSONAL) {
+ if (threadInfo.type === threadTypes.GENESIS_PERSONAL) {
const otherMembers = threadOtherMembers(
threadInfo.members,
this.props.viewerID,
diff --git a/web/chat/chat-thread-composer.react.js b/web/chat/chat-thread-composer.react.js
--- a/web/chat/chat-thread-composer.react.js
+++ b/web/chat/chat-thread-composer.react.js
@@ -73,7 +73,7 @@
const pendingPrivateThread = React.useRef(
createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PRIVATE,
+ threadType: threadTypes.GENESIS_PRIVATE,
members: [loggedInUserInfo],
}),
);
diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -67,7 +67,7 @@
[popModal, pushModal, threadInfo.id],
);
const membersItem = React.useMemo(() => {
- if (threadInfo.type === threadTypes.PERSONAL) {
+ if (threadInfo.type === threadTypes.GENESIS_PERSONAL) {
return null;
}
return (
diff --git a/web/utils/thread-utils.js b/web/utils/thread-utils.js
--- a/web/utils/thread-utils.js
+++ b/web/utils/thread-utils.js
@@ -48,7 +48,7 @@
const pendingPrivateThread = React.useRef(
createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PRIVATE,
+ threadType: threadTypes.GENESIS_PRIVATE,
members: [loggedInUserInfo],
}),
);
@@ -58,7 +58,7 @@
() => ({
...createPendingThread({
viewerID: loggedInUserInfo.id,
- threadType: threadTypes.PRIVATE,
+ threadType: threadTypes.GENESIS_PRIVATE,
members: [loggedInUserInfo],
name: 'New thread',
}),

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 11:29 PM (10 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2566532
Default Alt Text
D12482.id41720.diff (26 KB)

Event Timeline