Skip to content

Commit

Permalink
invitePersonToRoom: return early both in dry and wet run (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre authored Feb 1, 2024
1 parent e2f42f5 commit cd74dbf
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 cd74dbf

Please sign in to comment.