mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-25 19:51:39 +01:00
some cleanup
This commit is contained in:
parent
fdf097dc89
commit
53720f56df
@ -50,14 +50,13 @@ function processEvent(data, event) {
|
|||||||
data = data.cloneIfNeeded();
|
data = data.cloneIfNeeded();
|
||||||
data.isEncrypted = true;
|
data.isEncrypted = true;
|
||||||
}
|
}
|
||||||
}
|
} else if (event.type === "m.room.name") {
|
||||||
if (event.type === "m.room.name") {
|
|
||||||
const newName = event.content?.name;
|
const newName = event.content?.name;
|
||||||
if (newName !== data.name) {
|
if (newName !== data.name) {
|
||||||
data = data.cloneIfNeeded();
|
data = data.cloneIfNeeded();
|
||||||
data.name = newName;
|
data.name = newName;
|
||||||
}
|
}
|
||||||
} if (event.type === "m.room.avatar") {
|
} else if (event.type === "m.room.avatar") {
|
||||||
const newUrl = event.content?.url;
|
const newUrl = event.content?.url;
|
||||||
if (newUrl !== data.avatarUrl) {
|
if (newUrl !== data.avatarUrl) {
|
||||||
data = data.cloneIfNeeded();
|
data = data.cloneIfNeeded();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user