Send the invitation as a light letter that names the community, the inviter by email, and who can read the Rule.
This commit is contained in:
1 parent
70ceb73104
commit
727a92a9ac
14 files changed
+534
-26
No files matched your search
@@ -18,8 +18,11 @@ export async function createRuleStakeholderInviteAndSendMail(opts: {
|
||||
origin: string;
|
||||
ruleId: string;
|
||||
ruleTitle: string;
|
||||
summary?: string | null;
|
||||
document?: unknown;
|
||||
email: string;
|
||||
invitedByUserId: string;
|
||||
inviterEmail: string;
|
||||
pepper: string;
|
||||
}): Promise<{ ok: true } | { ok: false }> {
|
||||
const token = newSessionToken();
|
||||
@@ -38,7 +41,15 @@ export async function createRuleStakeholderInviteAndSendMail(opts: {
|
||||
|
||||
const verifyUrl = stakeholderInviteVerifyUrl(opts.origin, token);
|
||||
try {
|
||||
await sendRuleStakeholderInviteEmail(opts.email, verifyUrl, opts.ruleTitle);
|
||||
await sendRuleStakeholderInviteEmail({
|
||||
to: opts.email,
|
||||
verifyUrl,
|
||||
origin: opts.origin,
|
||||
communityName: opts.ruleTitle,
|
||||
inviterEmail: opts.inviterEmail,
|
||||
summary: opts.summary,
|
||||
document: opts.document,
|
||||
});
|
||||
return { ok: true };
|
||||
} catch (err) {
|
||||
logRouteError(opts.scope, opts.requestId, err, {
|
||||
|
||||
Reference in new issue
Block a user