mirror of https://github.com/vector-im/riot-web
Check if user widget.
parent
b2d23b6999
commit
a81269cba8
|
@ -628,6 +628,7 @@ const onMessage = function(event) {
|
||||||
// Get and set user widgets (not associated with a specific room)
|
// Get and set user widgets (not associated with a specific room)
|
||||||
// If roomId is specified, it must be validated, so room-based widgets agreed
|
// If roomId is specified, it must be validated, so room-based widgets agreed
|
||||||
// handled further down.
|
// handled further down.
|
||||||
|
if (event.data.userWidget) {
|
||||||
if (event.data.action === "get_widgets") {
|
if (event.data.action === "get_widgets") {
|
||||||
getWidgets(event, null);
|
getWidgets(event, null);
|
||||||
return;
|
return;
|
||||||
|
@ -635,6 +636,7 @@ const onMessage = function(event) {
|
||||||
setWidget(event, null);
|
setWidget(event, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!roomId) {
|
if (!roomId) {
|
||||||
sendError(event, _t('Missing room_id in request'));
|
sendError(event, _t('Missing room_id in request'));
|
||||||
|
@ -661,10 +663,10 @@ const onMessage = function(event) {
|
||||||
|
|
||||||
// Get and set room-based widgets
|
// Get and set room-based widgets
|
||||||
if (event.data.action === "get_widgets") {
|
if (event.data.action === "get_widgets") {
|
||||||
getWidgets(event, null);
|
getWidgets(event, roomId);
|
||||||
return;
|
return;
|
||||||
} else if (event.data.action === "set_widget") {
|
} else if (event.data.action === "set_widget") {
|
||||||
setWidget(event, null);
|
setWidget(event, roomId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue