You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Wait for setAccountData to complete.
This commit is contained in:
@@ -355,12 +355,13 @@ function setWidget(event, roomId) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
client.setAccountData('m.widgets', userWidgets);
|
client.setAccountData('m.widgets', userWidgets).then(() => {
|
||||||
sendResponse(event, {
|
sendResponse(event, {
|
||||||
success: true,
|
success: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
dis.dispatch({ action: "user_widget_updated" });
|
dis.dispatch({ action: "user_widget_updated" });
|
||||||
|
});
|
||||||
} else { // Room widget
|
} else { // Room widget
|
||||||
if (!roomId) {
|
if (!roomId) {
|
||||||
sendError(event, _t('Missing roomId.'), null);
|
sendError(event, _t('Missing roomId.'), null);
|
||||||
|
|||||||
Reference in New Issue
Block a user