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)
Thu, Nov 7, 2:38 AM
Unknown Object (File)
Wed, Oct 23, 3:47 AM
Unknown Object (File)
Tue, Oct 22, 9:58 PM
Unknown Object (File)
Tue, Oct 22, 9:24 PM
Unknown Object (File)
Tue, Oct 22, 7:00 PM
Unknown Object (File)
Tue, Oct 22, 5:14 PM
Unknown Object (File)
Tue, Oct 22, 4:42 PM
Unknown Object (File)
Tue, Oct 15, 8:04 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