Page MenuHomePhabricator

[lib] Remove `threadOrParentThreadHasAdminRole` check from `threadIsWithBlockedUserOnly`
AbandonedPublic

Authored by atul on Mar 11 2024, 1:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 2:06 AM
Unknown Object (File)
Thu, Apr 11, 4:59 PM
Unknown Object (File)
Thu, Apr 11, 4:58 PM
Unknown Object (File)
Apr 1 2024, 3:20 AM
Unknown Object (File)
Mar 29 2024, 4:33 AM
Unknown Object (File)
Mar 21 2024, 2:37 AM
Unknown Object (File)
Mar 20 2024, 4:29 AM
Unknown Object (File)
Mar 16 2024, 5:41 PM
Subscribers

Details

Summary
NOTE: I'm not positive about this change, but putting up diff to unblock rest of stack (migration, flip switch, etc.) Will come back and update this as needed once I have better understanding.

My understanding is that

I might be missing something obvious here, but my understanding is that this check was added to threadIsWithBlockedUserOnly before all threads were moved into communities. It appears that this check was intended to handle threads that lived "outside" any thread hierarchy that included an admin role. Specifically, PERSONAL threads and LOCAL/COMMUNITY_SECRET_SUBTHREADs where eg all but two members have left the thread?

Assuming the following are true

  1. All threads must now live within a community
  2. All communities must have an Admin role (?)

I believe threadOrParentThreadHasAdminRole, updated to check community root for admin role, would always return true. Consequently threadIsWithBlockedUserOnly would always return false.

I don't think this check/logic is still relevant...and if it is, it should probably be updated.


Depends on D11286

Test Plan

This function is consumed by threadFrozenDueToBlock and threadFrozenDueToViewerBlock.

Those are consumed by checkThreadsFrozen, getMinimallyEncodedCurrentUser, web/ChatInputBar, and native/ChatInputBar.

I will go through each of those and ensure that functions/components continue to work as expected.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage