diff --git a/src/App/BridgeApp.ts b/src/App/BridgeApp.ts index 451d6ca1..47b1ec0a 100644 --- a/src/App/BridgeApp.ts +++ b/src/App/BridgeApp.ts @@ -1,4 +1,4 @@ -import { GithubBridge } from "../GithubBridge"; +import { Bridge } from "../Bridge"; import LogWrapper from "../LogWrapper"; import { BridgeConfig, parseRegistrationFile } from "../Config/Config"; @@ -24,7 +24,7 @@ async function start() { userNotificationWatcher.start(); } - const bridgeApp = new GithubBridge(config, registration); + const bridgeApp = new Bridge(config, registration); process.once("SIGTERM", () => { log.error("Got SIGTERM"); diff --git a/src/GithubBridge.ts b/src/Bridge.ts similarity index 99% rename from src/GithubBridge.ts rename to src/Bridge.ts index dbaf2f25..8fe6cd4e 100644 --- a/src/GithubBridge.ts +++ b/src/Bridge.ts @@ -28,9 +28,9 @@ import { UserNotificationsEvent } from "./Notifications/UserNotificationWatcher" import { UserTokenStore } from "./UserTokenStore"; import * as GitHubWebhookTypes from "@octokit/webhooks-types"; import LogWrapper from "./LogWrapper"; -const log = new LogWrapper("GithubBridge"); +const log = new LogWrapper("Bridge"); -export class GithubBridge { +export class Bridge { private readonly as: Appservice; private readonly storage: IBridgeStorageProvider; private readonly messageClient: MessageSenderClient; @@ -325,7 +325,7 @@ export class GithubBridge { const adminRoom = [...this.adminRooms.values()].find((r) => r.oauthState === msg.data.state); await this.queue.push({ data: !!(adminRoom), - sender: "GithubBridge", + sender: "Bridge", messageId: msg.messageId, eventName: "response.oauth.response", }); @@ -789,7 +789,7 @@ export class GithubBridge { log.info(`Notifications enabled for ${adminRoom.userId} and token was found`); await this.queue.push({ eventName: "notifications.user.enable", - sender: "GithubBridge", + sender: "Bridge", data: { userId: adminRoom.userId, roomId: adminRoom.roomId, @@ -806,7 +806,7 @@ export class GithubBridge { } else if (oldSettings.github?.notifications?.enabled && !settings.github?.notifications?.enabled) { await this.queue.push({ eventName: "notifications.user.disable", - sender: "GithubBridge", + sender: "Bridge", data: { userId: adminRoom.userId, type: "github", @@ -822,7 +822,7 @@ export class GithubBridge { log.info(`GitLab ${instanceName} notifications enabled for ${adminRoom.userId}`); await this.queue.push({ eventName: "notifications.user.enable", - sender: "GithubBridge", + sender: "Bridge", data: { userId: adminRoom.userId, roomId: adminRoom.roomId, @@ -837,7 +837,7 @@ export class GithubBridge { log.info(`GitLab ${instanceName} notifications disabled for ${adminRoom.userId}`); await this.queue.push({ eventName: "notifications.user.disable", - sender: "GithubBridge", + sender: "Bridge", data: { userId: adminRoom.userId, type: "gitlab", diff --git a/src/MatrixSender.ts b/src/MatrixSender.ts index ac6bd8b5..37ae5ddf 100644 --- a/src/MatrixSender.ts +++ b/src/MatrixSender.ts @@ -80,7 +80,7 @@ export class MessageSenderClient { sender: string|null = null): Promise { return (await this.queue.pushWait({ eventName: "matrix.message", - sender: "GithubBridge", + sender: "Bridge", data: { roomId, type: eventType, diff --git a/src/Widgets/BridgeWidgetApi.ts b/src/Widgets/BridgeWidgetApi.ts index e3f87096..f5160c3b 100644 --- a/src/Widgets/BridgeWidgetApi.ts +++ b/src/Widgets/BridgeWidgetApi.ts @@ -3,7 +3,7 @@ import cors from "cors"; import { AdminRoom } from "../AdminRoom"; import LogWrapper from "../LogWrapper"; -const log = new LogWrapper("GithubBridge"); +const log = new LogWrapper("BridgeWidgetApi"); export class BridgeWidgetApi { private app: Application;