Add setting to hide avatars of rooms you have been invited to. (#29497)

* Add ability to block images of rooms you have been invited to.

* strings

* Add tests

* fix snapshot

* tweaks

* lint
This commit is contained in:
Will Hunt
2025-03-14 12:03:09 +00:00
committed by GitHub
parent 4e3daa5df5
commit 66d9d717c4
8 changed files with 304 additions and 193 deletions
@@ -1,5 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`RoomAvatar should not render an invite avatar if the user has disabled it 1`] = `
<div>
<span
class="_avatar_1qbcf_8 mx_BaseAvatar _avatar-imageless_1qbcf_52"
data-color="6"
data-testid="avatar-img"
data-type="round"
role="presentation"
style="--cpd-avatar-size: 36px;"
>
t
</span>
</div>
`;
exports[`RoomAvatar should render an avatar for a room the user is invited to 1`] = `
<div>
<span
aria-label="Avatar"
class="_avatar_1qbcf_8 mx_BaseAvatar"
data-color="6"
data-testid="avatar-img"
data-type="round"
style="--cpd-avatar-size: 36px;"
>
<img
alt=""
class="_image_1qbcf_41"
data-type="round"
height="36px"
loading="lazy"
referrerpolicy="no-referrer"
src="http://this.is.a.url/example.com/foobar"
width="36px"
/>
</span>
</div>
`;
exports[`RoomAvatar should render as expected for a DM room 1`] = `
<div>
<span