use wildcard for widget client origin
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 35s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 35s
Details
This commit is contained in:
parent
435553bf05
commit
58dc26ee30
|
@ -244,37 +244,14 @@ function Widget() {
|
|||
/* --------------------------- END MAIN INITIALIZION EFFECT ----------------------- */
|
||||
/* -------------------------------------------------------------------------------- */
|
||||
|
||||
// useEffect(() => {
|
||||
// // api.requestCapability(MatrixCapabilities.)
|
||||
// api.on('action:m.message', (ev) => {
|
||||
// console.log('action:m.message', ev);
|
||||
// });
|
||||
// api.start();
|
||||
// }, []);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('window.location', window.location);
|
||||
const { searchParams } = new URL(window.location.href);
|
||||
const widgetId = searchParams.get('widgetId');
|
||||
|
||||
widgetApi.current = widgetApi.current ?? new WidgetApi(widgetId, 'https://chat.dgov.io');
|
||||
|
||||
console.log('widget api', widgetApi.current);
|
||||
|
||||
// widgetApi.current.requestCapability(MatrixCapabilities.AlwaysOnScreen);
|
||||
|
||||
// widgetApi.current.requestCapabilities([
|
||||
// WidgetEventCapability.forRoomEvent(
|
||||
// EventDirection.Send,
|
||||
// 'm.message',
|
||||
// ),
|
||||
// ]);
|
||||
|
||||
// widgetApi.current.updateRequestedCapabilities();
|
||||
|
||||
widgetApi.current.on('ready', (e) => {
|
||||
console.log('WIDGET READY', e);
|
||||
widgetApi.current = widgetApi.current ?? new WidgetApi(widgetId, '*');
|
||||
|
||||
widgetApi.current.on('ready', () => {
|
||||
const sendMessageCapability = WidgetEventCapability.forRoomEvent(
|
||||
EventDirection.Send,
|
||||
'm.room.message',
|
||||
|
|
Loading…
Reference in New Issue