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)
Tue, Dec 24, 7:33 AM
Unknown Object (File)
Tue, Dec 24, 7:32 AM
Unknown Object (File)
Tue, Dec 24, 7:32 AM
Unknown Object (File)
Wed, Dec 11, 5:24 PM
Unknown Object (File)
Sun, Dec 8, 1:33 AM
Unknown Object (File)
Tue, Nov 26, 9:32 PM
Unknown Object (File)
Nov 24 2024, 10:32 PM
Unknown Object (File)
Nov 24 2024, 8:56 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