Skip to content

Commit

Permalink
Hotfix/fix workflows (#6071)
Browse files Browse the repository at this point in the history
* Hotfix: metadata parsing

* Hotfix: removed data64 avatar for 4mb payload limit

* Hotfix: Installed Apps Tabs Switchi g (#5063) (#5064)

* Hotfix: metadata parsing

* Use Router query as tabs use shallow routing, data-fetching doesnt occur on switching tabs

Co-authored-by: zomars <zomars@me.com>

Co-authored-by: zomars <zomars@me.com>

* Hotfix/email scheduling memory limit (#5839)

* Hotfix: metadata parsing

* Hotfix: removed data64 avatar for 4mb payload limit

* Hotfix: Installed Apps Tabs Switchi g (#5063) (#5064)

* Hotfix: metadata parsing

* Use Router query as tabs use shallow routing, data-fetching doesnt occur on switching tabs

Co-authored-by: zomars <zomars@me.com>

Co-authored-by: zomars <zomars@me.com>

* remove if and at to query

Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* Fix/workflow email (#6069)

* teams plan needed

* disable

* disable

* type fix

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
  • Loading branch information
4 people committed Dec 16, 2022
1 parent 962b463 commit 53fd407
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const scheduleEmailReminder = async (
workflowStepId: number,
template: WorkflowTemplates
) => {
if (action === WorkflowActions.EMAIL_ADDRESS) return;
const { startTime, endTime } = evt;
const uid = evt.uid as string;
const currentDate = dayjs();
Expand Down Expand Up @@ -76,10 +77,6 @@ export const scheduleEmailReminder = async (
attendeeName = evt.organizer.name;
timeZone = evt.attendees[0].timeZone;
break;
case WorkflowActions.EMAIL_ADDRESS:
name = "";
attendeeName = evt.attendees[0].name;
timeZone = evt.organizer.timeZone;
}

let emailContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ export const scheduleWorkflowReminders = async (
);
} else if (
step.action === WorkflowActions.EMAIL_ATTENDEE ||
step.action === WorkflowActions.EMAIL_HOST ||
step.action === WorkflowActions.EMAIL_ADDRESS
step.action === WorkflowActions.EMAIL_HOST
) {
let sendTo = "";

Expand All @@ -70,8 +69,6 @@ export const scheduleWorkflowReminders = async (
case WorkflowActions.EMAIL_ATTENDEE:
sendTo = evt.attendees[0].email;
break;
case WorkflowActions.EMAIL_ADDRESS:
sendTo = step.sendTo || "";
}
scheduleEmailReminder(
evt,
Expand Down Expand Up @@ -129,8 +126,7 @@ export const sendCancelledReminders = async (
);
} else if (
step.action === WorkflowActions.EMAIL_ATTENDEE ||
step.action === WorkflowActions.EMAIL_HOST ||
step.action === WorkflowActions.EMAIL_ADDRESS
step.action === WorkflowActions.EMAIL_HOST
) {
let sendTo = "";

Expand All @@ -141,8 +137,6 @@ export const sendCancelledReminders = async (
case WorkflowActions.EMAIL_ATTENDEE:
sendTo = evt.attendees[0].email;
break;
case WorkflowActions.EMAIL_ADDRESS:
sendTo = step.sendTo || "";
}
scheduleEmailReminder(
evt,
Expand Down
2 changes: 1 addition & 1 deletion packages/trpc/server/routers/viewer/workflows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ export const workflowsRouter = router({
throw new TRPCError({ code: "UNAUTHORIZED" });
}

if (isSMSAction(step.action)) {
if (isSMSAction(step.action) || step.action === WorkflowActions.EMAIL_ADDRESS) {
const hasTeamPlan = (await ctx.prisma.membership.count({ where: { userId: user.id } })) > 0;
if (!hasTeamPlan) {
throw new TRPCError({ code: "UNAUTHORIZED", message: "Team plan needed" });
Expand Down

1 comment on commit 53fd407

@vercel
Copy link

@vercel vercel bot commented on 53fd407 Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cal – ./

cal-cal.vercel.app
app.calendso.com
cal-git-production-cal.vercel.app
app.cal.com

Please sign in to comment.