In ENG-9026, @inka uncovered an issue where the admin of a community doesn't have the ability to react.
This is occurring because of my changes in D13017. In that diff, I changed where certain permissions were coming from, including REACT_TO_MESSAGE and EDIT_MESSAGE.
Previously these permissions would come from getRolePermissionBlobs, meaning that the permissions would come from each individual chat's role permissions. This didn't work because it meant that the user-surfaced role permissions system was not respected for channels under a community root; it only affected the root.
After my changes, the permissions came from userSurfacedPermissionOptions. However, the problem was that we only use these user-surfaced permissions for members, not for admins.
As a result of removing the permissions from getRolePermissionBlobs for both members and admins, without replacing them for admins, not REACT_TO_MESSAGE and EDIT_MESSAGE became missing for admins.
This diff addresses it by making sure admins can always react and edit messages in all chats within a community.