Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32047005
D13258.1764987430.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D13258.1764987430.diff
View Options
diff --git a/lib/shared/thread-actions-utils.js b/lib/shared/thread-actions-utils.js
--- a/lib/shared/thread-actions-utils.js
+++ b/lib/shared/thread-actions-utils.js
@@ -125,7 +125,7 @@
);
if (threadTypeIsThick(threadInfo.type)) {
const type = assertThickThreadType(
- pendingThreadType(otherMemberIDs.length),
+ pendingThreadType(otherMemberIDs.length, 'thick'),
);
invariant(
@@ -140,7 +140,7 @@
});
} else {
const type = assertThinThreadType(
- pendingThreadType(otherMemberIDs.length),
+ pendingThreadType(otherMemberIDs.length, 'thin'),
);
invariant(
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
@@ -693,8 +693,9 @@
function pendingThreadType(
numberOfOtherMembers: number,
+ thickOrThin: 'thick' | 'thin',
): 4 | 6 | 7 | 13 | 14 | 15 {
- if (usingOlmViaTunnelbrokerForDMs) {
+ if (usingOlmViaTunnelbrokerForDMs && thickOrThin === 'thick') {
if (numberOfOtherMembers === 0) {
return threadTypes.PRIVATE;
} else if (numberOfOtherMembers === 1) {
@@ -1268,7 +1269,7 @@
const { sourceMessageID } = baseThreadInfo;
const pendingThreadID = searching
? getPendingThreadID(
- pendingThreadType(userInfoInputArray.length),
+ pendingThreadType(userInfoInputArray.length, 'thin'),
[...userInfoInputArray.map(user => user.id), viewerID],
sourceMessageID,
)
@@ -1286,7 +1287,7 @@
const updatedThread = searching
? createPendingThread({
viewerID,
- threadType: pendingThreadType(userInfoInputArray.length),
+ threadType: pendingThreadType(userInfoInputArray.length, 'thick'),
members: [loggedInUserInfo, ...userInfoInputArray],
})
: baseThreadInfo;
diff --git a/native/chat/message-list-container.react.js b/native/chat/message-list-container.react.js
--- a/native/chat/message-list-container.react.js
+++ b/native/chat/message-list-container.react.js
@@ -167,7 +167,10 @@
parentThreadHeader = (
<ParentThreadHeader
parentThreadInfo={genesisThreadInfo}
- childThreadType={pendingThreadType(userInfoInputArray.length)}
+ childThreadType={pendingThreadType(
+ userInfoInputArray.length,
+ 'thin',
+ )}
/>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 2:17 AM (2 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5830936
Default Alt Text
D13258.1764987430.diff (2 KB)
Attached To
Mode
D13258: [lib][native] Review usingOlmViaTunnelbrokerForDMs and pendingThreadType
Attached
Detach File
Event Timeline
Log In to Comment