Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3354157
D12294.id40903.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
D12294.id40903.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
@@ -860,21 +860,15 @@
return encodedUpdatedPermissions;
}
-type ThreadIsWithBlockedUserOnlyOptions = {
- +checkOnlyViewerBlock: boolean,
- +skipMemberAdminRoleCheck: boolean,
-};
-
function threadIsWithBlockedUserOnly(
threadInfo: LegacyRawThreadInfo | RawThreadInfo,
viewerID: ?string,
userInfos: UserInfos,
- options: ThreadIsWithBlockedUserOnlyOptions,
+ checkOnlyViewerBlock: boolean,
): boolean {
- const { checkOnlyViewerBlock, skipMemberAdminRoleCheck } = options;
if (
threadOrParentThreadIsGroupChat(threadInfo) ||
- (!skipMemberAdminRoleCheck && threadOrParentThreadHasAdminRole(threadInfo))
+ threadOrParentThreadHasAdminRole(threadInfo)
) {
return false;
}
@@ -932,12 +926,7 @@
viewerID: ?string,
userInfos: UserInfos,
): boolean {
- const options: ThreadIsWithBlockedUserOnlyOptions = {
- checkOnlyViewerBlock: false,
- skipMemberAdminRoleCheck: false,
- };
-
- return threadIsWithBlockedUserOnly(threadInfo, viewerID, userInfos, options);
+ return threadIsWithBlockedUserOnly(threadInfo, viewerID, userInfos, false);
}
function useThreadFrozenDueToViewerBlock(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 12:04 PM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575505
Default Alt Text
D12294.id40903.diff (1 KB)
Attached To
Mode
D12294: [lib] Remove `skipMemberAdminRoleCheck` option from `threadIsWithBlockedUserOnly`
Attached
Detach File
Event Timeline
Log In to Comment