Page MenuHomePhabricator

D13258.id43922.diff
No OneTemporary

D13258.id43922.diff

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
@@ -121,7 +121,7 @@
);
if (threadTypeIsThick(threadInfo.type)) {
const type = assertThickThreadType(
- pendingThreadType(otherMemberIDs.length),
+ pendingThreadType(otherMemberIDs.length, true),
);
invariant(
@@ -136,7 +136,7 @@
});
} else {
const type = assertThinThreadType(
- pendingThreadType(otherMemberIDs.length),
+ pendingThreadType(otherMemberIDs.length, false),
);
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
@@ -665,8 +665,9 @@
function pendingThreadType(
numberOfOtherMembers: number,
+ thick: boolean,
): 4 | 6 | 7 | 13 | 14 | 15 {
- if (usingOlmViaTunnelbrokerForDMs) {
+ if (usingOlmViaTunnelbrokerForDMs && thick) {
if (numberOfOtherMembers === 0) {
return threadTypes.PRIVATE;
} else if (numberOfOtherMembers === 1) {
@@ -1240,7 +1241,7 @@
const { sourceMessageID } = baseThreadInfo;
const pendingThreadID = searching
? getPendingThreadID(
- pendingThreadType(userInfoInputArray.length),
+ pendingThreadType(userInfoInputArray.length, false),
[...userInfoInputArray.map(user => user.id), viewerID],
sourceMessageID,
)
@@ -1258,7 +1259,7 @@
const updatedThread = searching
? createPendingThread({
viewerID,
- threadType: pendingThreadType(userInfoInputArray.length),
+ threadType: pendingThreadType(userInfoInputArray.length, true),
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
@@ -159,6 +159,7 @@
let searchComponent = null;
if (searching) {
+ console.log('searching');
const { userInfoInputArray, genesisThreadInfo } = this.props;
// It's technically possible for the client to be missing the Genesis
// ThreadInfo when it first opens up (before the server delivers it)
@@ -167,7 +168,10 @@
parentThreadHeader = (
<ParentThreadHeader
parentThreadInfo={genesisThreadInfo}
- childThreadType={pendingThreadType(userInfoInputArray.length)}
+ childThreadType={pendingThreadType(
+ userInfoInputArray.length,
+ false,
+ )}
/>
);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 11:35 PM (19 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2446809
Default Alt Text
D13258.id43922.diff (2 KB)

Event Timeline