Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3181745
D11317.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
D11317.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
@@ -963,6 +963,7 @@
roles: rawThreadInfo.roles,
currentUser: getMinimallyEncodedCurrentUser(
rawThreadInfo,
+ null,
viewerID,
userInfos,
),
@@ -998,10 +999,18 @@
function getMinimallyEncodedCurrentUser(
threadInfo: RawThreadInfo | ThreadInfo,
+ communityThreadInfo: ?(RawThreadInfo | ThreadInfo),
viewerID: ?string,
userInfos: UserInfos,
): ThreadCurrentUserInfo {
- if (!clientThreadFrozenDueToBlock(threadInfo, viewerID, userInfos)) {
+ if (
+ !clientThreadFrozenDueToBlock(
+ threadInfo,
+ communityThreadInfo,
+ viewerID,
+ userInfos,
+ )
+ ) {
return threadInfo.currentUser;
}
const decodedPermissions = threadPermissionsFromBitmaskHex(
@@ -1060,6 +1069,7 @@
function clientThreadFrozenDueToBlock(
threadInfo: RawThreadInfo | ThreadInfo,
+ communityThreadInfo: ?(RawThreadInfo | ThreadInfo),
viewerID: ?string,
userInfos: UserInfos,
): boolean {
@@ -1340,6 +1350,7 @@
...updatedThread,
currentUser: getMinimallyEncodedCurrentUser(
updatedThread,
+ null,
viewerID,
userInfos,
),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 6:46 AM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2449852
Default Alt Text
D11317.diff (1 KB)
Attached To
Mode
D11317: [lib] Update `clientThreadFrozenDueToBlock` and `getMinimallyEncodedCurrentUser` signatures to include `communityThreadInfo`
Attached
Detach File
Event Timeline
Log In to Comment