Multi-environment and multi-user construction
This commit is contained in:
@@ -350,7 +350,10 @@ export class AutomationsService {
|
||||
|
||||
if (wantSms) {
|
||||
const user = await this.prisma.user.findFirst({
|
||||
where: { id: userId, organizationId: ctx.organizationId },
|
||||
where: {
|
||||
id: userId,
|
||||
memberships: { some: { organizationId: ctx.organizationId } },
|
||||
},
|
||||
select: { mobile: true },
|
||||
});
|
||||
await this.sendAutomationSms(user?.mobile, smsText);
|
||||
|
||||
Reference in New Issue
Block a user