fix: show verification badges regardless of room encryption state
Spaces and unencrypted rooms have hasEncryptionStateEvent() = false, causing all badges to be hidden. Cross-signing verification is a user identity property, not room-specific — show badges whenever crossSigningActive, keep the E2EE banner gated on isEncrypted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ export function UserRoomProfile({ userId }: UserRoomProfileProps) {
|
|||||||
const ignored = ignoredUsers.includes(userId);
|
const ignored = ignoredUsers.includes(userId);
|
||||||
|
|
||||||
const room = useRoom();
|
const room = useRoom();
|
||||||
const showEncryption = room.hasEncryptionStateEvent() && crossSigningActive;
|
const showEncryption = crossSigningActive;
|
||||||
const powerLevels = usePowerLevels(room);
|
const powerLevels = usePowerLevels(room);
|
||||||
const creators = useRoomCreators(room);
|
const creators = useRoomCreators(room);
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export function Members({ requestClose }: MembersProps) {
|
|||||||
const room = useRoom();
|
const room = useRoom();
|
||||||
const members = useRoomMembers(mx, room.roomId);
|
const members = useRoomMembers(mx, room.roomId);
|
||||||
const crossSigningActive = useCrossSigningActive();
|
const crossSigningActive = useCrossSigningActive();
|
||||||
const showEncryption = room.hasEncryptionStateEvent() && crossSigningActive;
|
const showEncryption = crossSigningActive;
|
||||||
const fetchingMembers = members.length < room.getJoinedMemberCount();
|
const fetchingMembers = members.length < room.getJoinedMemberCount();
|
||||||
const openProfile = useOpenUserRoomProfile();
|
const openProfile = useOpenUserRoomProfile();
|
||||||
const profileUser = useUserRoomProfileState();
|
const profileUser = useUserRoomProfileState();
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) {
|
|||||||
const useAuthentication = useMediaAuthentication();
|
const useAuthentication = useMediaAuthentication();
|
||||||
const isEncrypted = room.hasEncryptionStateEvent();
|
const isEncrypted = room.hasEncryptionStateEvent();
|
||||||
const crossSigningActive = useCrossSigningActive();
|
const crossSigningActive = useCrossSigningActive();
|
||||||
const showEncryption = isEncrypted && crossSigningActive;
|
const showEncryption = crossSigningActive;
|
||||||
const scrollRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;
|
const scrollRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;
|
||||||
const searchInputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;
|
const searchInputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;
|
||||||
const scrollTopAnchorRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;
|
const scrollTopAnchorRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;
|
||||||
|
|||||||
Reference in New Issue
Block a user