Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 359d2fe

Browse files
authored
Merge pull request #3510 from matrix-org/dbkr/set_im_update
Fix integration manager not updating when set
2 parents 8ef61ce + d82a05f commit 359d2fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/WidgetUtils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ export default class WidgetUtils {
233233
};
234234

235235
const client = MatrixClientPeg.get();
236-
const userWidgets = WidgetUtils.getUserWidgets();
236+
// Get the current widgets and clone them before we modify them, otherwise
237+
// we'll modify the content of the old event.
238+
const userWidgets = JSON.parse(JSON.stringify(WidgetUtils.getUserWidgets()));
237239

238240
// Delete existing widget with ID
239241
try {

0 commit comments

Comments
 (0)