Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Will Hunt <will@half-shot.uk>
  • Loading branch information
H-Shay and Half-Shot authored Jan 16, 2024
1 parent 1a45cdc commit 240dc99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,5 @@ metrics:
port: 8081
address: 127.0.0.1

# if set to "true" will prevent the conf-bot from sending live invites to email/matrix_ids
# if set to `true` will prevent the conf-bot from sending live invites to email/matrix_ids
dry_run_enabled: false
4 changes: 2 additions & 2 deletions src/invites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function resolveIdentifiers(client: ConferenceMatrixClient, people:
export async function invitePersonToRoom(client: ConferenceMatrixClient, resolvedPerson: ResolvedPersonIdentifier, roomId: string, config: IConfig): Promise<void> {
if (resolvedPerson.mxid) {
if (config.dry_run_enabled) {
LogService.info("invites", `Inviting ${resolvedPerson.mxid}`)
LogService.info("invites", `Inviting ${resolvedPerson.mxid} (dry-run)`)
}
else {
return await client.inviteUser(resolvedPerson.mxid.trim(), roomId);
Expand All @@ -100,7 +100,7 @@ export async function invitePersonToRoom(client: ConferenceMatrixClient, resolve

for (const email of resolvedPerson.emails) {
if (config.dry_run_enabled) {
LogService.info("invites", `Third-party inviting ${email}`)
LogService.info("invites", `Third-party inviting ${email} (dry-run)`)
}
else {
const idInvite = await client.identityClient.makeEmailInvite(email, roomId);
Expand Down

0 comments on commit 240dc99

Please sign in to comment.