mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-24 07:51:34 +02:00
Fix the ability to remove avatar from a space via settings
This commit is contained in:
parent
a8b6094482
commit
6e74ab0cf5
@ -73,9 +73,13 @@ const SpaceSettingsDialog: React.FC<IProps> = ({ matrixClient: cli, space, onFin
|
|||||||
const promises = [];
|
const promises = [];
|
||||||
|
|
||||||
if (avatarChanged) {
|
if (avatarChanged) {
|
||||||
|
if (newAvatar) {
|
||||||
promises.push(cli.sendStateEvent(space.roomId, EventType.RoomAvatar, {
|
promises.push(cli.sendStateEvent(space.roomId, EventType.RoomAvatar, {
|
||||||
url: await cli.uploadContent(newAvatar),
|
url: await cli.uploadContent(newAvatar),
|
||||||
}, ""));
|
}, ""));
|
||||||
|
} else {
|
||||||
|
promises.push(cli.sendStateEvent(space.roomId, EventType.RoomAvatar, {}, ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nameChanged) {
|
if (nameChanged) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user