Merge pull request #3510 from matrix-org/dbkr/set_im_update

Fix integration manager not updating when set
pull/21833/head
David Baker 2019-10-03 14:02:25 +01:00 committed by GitHub
commit 359d2fee5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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 {