Auto-fix lint errors
This commit is contained in:
parent
4c5720a573
commit
ae0a8b8da4
625 changed files with 3170 additions and 3232 deletions
|
@ -46,9 +46,9 @@ import ActiveWidgetStore from "../ActiveWidgetStore";
|
|||
import { objectShallowClone } from "../../utils/objects";
|
||||
import defaultDispatcher from "../../dispatcher/dispatcher";
|
||||
import { ElementWidgetActions, IViewRoomApiRequest } from "./ElementWidgetActions";
|
||||
import {ModalWidgetStore} from "../ModalWidgetStore";
|
||||
import { ModalWidgetStore } from "../ModalWidgetStore";
|
||||
import ThemeWatcher from "../../settings/watchers/ThemeWatcher";
|
||||
import {getCustomTheme} from "../../theme";
|
||||
import { getCustomTheme } from "../../theme";
|
||||
import CountlyAnalytics from "../../CountlyAnalytics";
|
||||
import { ElementWidgetCapabilities } from "./ElementWidgetCapabilities";
|
||||
import { MatrixEvent, IEvent } from "matrix-js-sdk/src/models/event";
|
||||
|
@ -180,17 +180,17 @@ export class StopGapWidget extends EventEmitter {
|
|||
* The URL to use in the iframe
|
||||
*/
|
||||
public get embedUrl(): string {
|
||||
return this.runUrlTemplate({asPopout: false});
|
||||
return this.runUrlTemplate({ asPopout: false });
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to use in the popout
|
||||
*/
|
||||
public get popoutUrl(): string {
|
||||
return this.runUrlTemplate({asPopout: true});
|
||||
return this.runUrlTemplate({ asPopout: true });
|
||||
}
|
||||
|
||||
private runUrlTemplate(opts = {asPopout: false}): string {
|
||||
private runUrlTemplate(opts = { asPopout: false }): string {
|
||||
const templated = this.mockWidget.getCompleteUrl({
|
||||
widgetRoomId: this.roomId,
|
||||
currentUserId: MatrixClientPeg.get().getUserId(),
|
||||
|
@ -244,7 +244,7 @@ export class StopGapWidget extends EventEmitter {
|
|||
error: {
|
||||
message: "Unable to open modal at this time",
|
||||
},
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -270,14 +270,14 @@ export class StopGapWidget extends EventEmitter {
|
|||
const targetRoomId = (ev.detail.data || {}).room_id;
|
||||
if (!targetRoomId) {
|
||||
return this.messaging.transport.reply(ev.detail, <IWidgetApiErrorResponseData>{
|
||||
error: {message: "Room ID not supplied."},
|
||||
error: { message: "Room ID not supplied." },
|
||||
});
|
||||
}
|
||||
|
||||
// Check the widget's permission
|
||||
if (!this.messaging.hasCapability(ElementWidgetCapabilities.CanChangeViewedRoom)) {
|
||||
return this.messaging.transport.reply(ev.detail, <IWidgetApiErrorResponseData>{
|
||||
error: {message: "This widget does not have permission for this action (denied)."},
|
||||
error: { message: "This widget does not have permission for this action (denied)." },
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -335,12 +335,12 @@ export class StopGapWidget extends EventEmitter {
|
|||
this.messaging.transport.reply(ev.detail, <IWidgetApiRequestEmptyData>{});
|
||||
|
||||
// First close the stickerpicker
|
||||
defaultDispatcher.dispatch({action: "stickerpicker_close"});
|
||||
defaultDispatcher.dispatch({ action: "stickerpicker_close" });
|
||||
|
||||
// Now open the integration manager
|
||||
// TODO: Spec this interaction.
|
||||
const data = ev.detail.data;
|
||||
const integType = data?.integType
|
||||
const integType = data?.integType;
|
||||
const integId = <string>data?.integId;
|
||||
|
||||
// TODO: Open the right integration manager for the widget
|
||||
|
@ -384,7 +384,7 @@ export class StopGapWidget extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
public stop(opts = {forceDestroy: false}) {
|
||||
public stop(opts = { forceDestroy: false }) {
|
||||
if (!opts?.forceDestroy && ActiveWidgetStore.getPersistentWidgetId() === this.mockWidget.id) {
|
||||
console.log("Skipping destroy - persistent widget");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue