mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Fix integration manager not updating when set
setUserWidget was modifying the content of the old event itself, so when `waitForUserWidget()` checked the content to see if it was there yet, it was, but because the echo hadn't come back, the IntegrationManager hadn't rebuilt its list. In other news, its terrifying that we can just accidentally modify the content of an event in the store. I'm going to make a js-sdk PR that freezes the content and see what breaks... Fixes https://github.com/vector-im/riot-web/issues/10977
This commit is contained in:
parent
c8c4dc29d1
commit
d82a05fbae
1 changed files with 3 additions and 1 deletions
|
@ -233,7 +233,9 @@ export default class WidgetUtils {
|
|||
};
|
||||
|
||||
const client = MatrixClientPeg.get();
|
||||
const userWidgets = WidgetUtils.getUserWidgets();
|
||||
// Get the current widgets and clone them before we modify them, otherwise
|
||||
// we'll modify the content of the old event.
|
||||
const userWidgets = JSON.parse(JSON.stringify(WidgetUtils.getUserWidgets()));
|
||||
|
||||
// Delete existing widget with ID
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue