Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3311468
D13538.id44719.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
D13538.id44719.diff
View Options
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
@@ -601,7 +601,7 @@
+pendingPersonalThreadUserInfo: UserInfo,
};
-function createPendingPersonalThread(
+function createPendingPersonalOrPrivateThread(
loggedInUserInfo: LoggedInUserInfo,
userID: string,
username: ?string,
@@ -612,14 +612,23 @@
username: username,
};
- const threadType = supportThickThreads
- ? threadTypes.PERSONAL
- : threadTypes.GENESIS_PERSONAL;
+ const members: Array<UserIDAndUsername> = [loggedInUserInfo];
+ let threadType;
+ if (loggedInUserInfo.id === userID) {
+ threadType = supportThickThreads
+ ? threadTypes.PRIVATE
+ : threadTypes.GENESIS_PRIVATE;
+ } else {
+ threadType = supportThickThreads
+ ? threadTypes.PERSONAL
+ : threadTypes.GENESIS_PERSONAL;
+ members.push(pendingPersonalThreadUserInfo);
+ }
const threadInfo = createPendingThread({
viewerID: loggedInUserInfo.id,
threadType,
- members: [loggedInUserInfo, pendingPersonalThreadUserInfo],
+ members,
});
return { threadInfo, pendingPersonalThreadUserInfo };
@@ -631,7 +640,7 @@
supportThickThreads: boolean,
): ChatThreadItem {
const { threadInfo, pendingPersonalThreadUserInfo } =
- createPendingPersonalThread(
+ createPendingPersonalOrPrivateThread(
loggedInUserInfo,
user.id,
user.username,
@@ -1747,7 +1756,7 @@
return personalThreadInfo ? { threadInfo: personalThreadInfo } : null;
}
- const pendingPersonalThreadInfo = createPendingPersonalThread(
+ const pendingPersonalThreadInfo = createPendingPersonalOrPrivateThread(
loggedInUserInfo,
userID,
username,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 8:53 AM (16 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2543861
Default Alt Text
D13538.id44719.diff (1 KB)
Attached To
Mode
D13538: [lib] Handle private threads differently from personal ones in thread list search
Attached
Detach File
Event Timeline
Log In to Comment