Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3181744
D11318.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
D11318.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
@@ -946,6 +946,26 @@
rawThreadInfo: RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
+): ThreadInfo {
+ const currentUser = getMinimallyEncodedCurrentUser(
+ rawThreadInfo,
+ null,
+ viewerID,
+ userInfos,
+ );
+ return baseThreadInfoFromRawThreadInfo(
+ rawThreadInfo,
+ viewerID,
+ userInfos,
+ currentUser,
+ );
+}
+
+function baseThreadInfoFromRawThreadInfo(
+ rawThreadInfo: RawThreadInfo,
+ viewerID: ?string,
+ userInfos: UserInfos,
+ currentUser: ThreadCurrentUserInfo,
): ThreadInfo {
let threadInfo: ThreadInfo = {
minimallyEncoded: true,
@@ -961,12 +981,7 @@
community: rawThreadInfo.community,
members: getRelativeMemberInfos(rawThreadInfo, viewerID, userInfos),
roles: rawThreadInfo.roles,
- currentUser: getMinimallyEncodedCurrentUser(
- rawThreadInfo,
- null,
- viewerID,
- userInfos,
- ),
+ currentUser,
repliesCount: rawThreadInfo.repliesCount,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 6:46 AM (17 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2449851
Default Alt Text
D11318.diff (1 KB)
Attached To
Mode
D11318: [lib] Introduce `threadInfoFromRawThreadInfo` wrapper that computes `currentUser` and passes to `baseThreadInfoFromRawThreadInfo`
Attached
Detach File
Event Timeline
Log In to Comment