From cd74dbf9d3e6005a60da20e6238e44eb39a5c99d Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 1 Feb 2024 18:14:20 +0000 Subject: [PATCH] invitePersonToRoom: return early both in dry and wet run (#218) --- src/invites.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/invites.ts b/src/invites.ts index 24c691e..7a5ea17 100644 --- a/src/invites.ts +++ b/src/invites.ts @@ -83,10 +83,10 @@ export async function invitePersonToRoom(client: ConferenceMatrixClient, resolve if (resolvedPerson.mxid) { if (config.dry_run_enabled) { LogService.info("invites", `Inviting ${resolvedPerson.mxid} (dry-run)`) + } else { + await client.inviteUser(resolvedPerson.mxid.trim(), roomId); } - else { - return await client.inviteUser(resolvedPerson.mxid.trim(), roomId); - } + return; } if (!resolvedPerson.emails) {