Skip to content

Commit fb2ef05

Browse files
fix(invites): Fix regression to invite creation (#359)
1 parent 10f9f6b commit fb2ef05

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed issue where invites appeared to be created successfully, but were not actually being created in the database. [#359](https://github.com/sourcebot-dev/sourcebot/pull/359)
12+
1013
## [4.4.0] - 2025-06-18
1114

1215
### Added

packages/web/src/actions.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,15 @@ export const createInvites = async (emails: string[], domain: string): Promise<{
10551055
} satisfies ServiceError;
10561056
}
10571057

1058+
await prisma.invite.createMany({
1059+
data: emails.map((email) => ({
1060+
recipientEmail: email,
1061+
hostUserId: userId,
1062+
orgId: org.id,
1063+
})),
1064+
skipDuplicates: true,
1065+
});
1066+
10581067
// Send invites to recipients
10591068
if (env.SMTP_CONNECTION_URL && env.EMAIL_FROM_ADDRESS) {
10601069
const origin = (await headers()).get('origin')!;

0 commit comments

Comments
 (0)