From 6f238fc13ff4ac3a344312fe12b819230ddaa549 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 29 Mar 2018 20:56:08 -0600 Subject: [PATCH] Appease the linter by actually making the code better --- src/neb/NebProxy.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/neb/NebProxy.ts b/src/neb/NebProxy.ts index 8ef4f18..4d6e93b 100644 --- a/src/neb/NebProxy.ts +++ b/src/neb/NebProxy.ts @@ -219,15 +219,14 @@ export class NebProxy { let newConfig = {rooms: {}}; if (!this.neb.upstreamId) { + const notifUser = await NebStore.getOrCreateNotificationUser(this.neb.id, "travisci", this.requestingUserId); + const client = new NebClient(this.neb); + newConfig = await client.getServiceConfig(notifUser.serviceId); // So we don't accidentally clear other rooms + if (repoKeys.length === 0) { - const notifUser = await NebStore.getOrCreateNotificationUser(this.neb.id, "travisci", this.requestingUserId); const appserviceClient = new MatrixAppserviceClient(await AppserviceStore.getAppservice(this.neb.appserviceId)); await appserviceClient.leaveRoom(notifUser.appserviceUserId, roomId); } - - const client = new NebClient(this.neb); - const notifUser = await NebStore.getOrCreateNotificationUser(this.neb.id, "travisci", this.requestingUserId); - newConfig = await client.getServiceConfig(notifUser.serviceId); // So we don't accidentally clear other rooms } // Reset the current room's configuration so we don't keep artifacts.