In theory, widgets could use iframe unload/beforeunload events for
cleanup, but in practice browsers have restrictions on what can be done
in those events which may not give sufficient time for clean
termination.
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Turns out that setUserWidget() wasn't updated to take a real WidgetType, but the code in ScalarMessaging thought it did. This leads to integration managers trying to add sticker widgets with an object `type` rather than a string `type`, which doesn't work.
This updates other code paths which call into the various widget classes to use WidgetType more often. The actual code path for fixing widgets is resolved in WidgetUtils for the setUserWidget function body.
It can be useful for the homeserver to support a dedicated Jitsi instance instead of requiring that all their users change/update their configs manually.