Skip to content

Commit

Permalink
invitePersonToRoom: return early both in dry and wet run
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Feb 1, 2024
1 parent 74a7270 commit d6b9b70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/invites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d6b9b70

Please sign in to comment.