message: Wait for setAccountData to complete.
diff: @@ -355,12 +355,13 @@ function setWidget(event, roomId) {
  };
  }
  - client.setAccountData('m.widgets', userWidgets);
  + client.setAccountData('m.widgets', userWidgets).then(() => {
  sendResponse(event, {
  success: true,
  });
  dis.dispatch({ action: "user_widget_updated" });
  + });
  } else { // Room widget
  if (!roomId) {
  sendError(event, _t('Missing roomId.'), null);
  