From b50430114fe72a836e4f2923dca002ba2e47a409 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:48:38 -0400 Subject: [PATCH] Disable setting profile picture (#22074) --- packages/app-store/googlecalendar/api/callback.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/app-store/googlecalendar/api/callback.ts b/packages/app-store/googlecalendar/api/callback.ts index 949350ecc6..9d9d545a90 100644 --- a/packages/app-store/googlecalendar/api/callback.ts +++ b/packages/app-store/googlecalendar/api/callback.ts @@ -2,15 +2,9 @@ import { calendar_v3 } from "@googleapis/calendar"; import { OAuth2Client } from "googleapis-common"; import type { NextApiRequest, NextApiResponse } from "next"; -import { updateProfilePhotoGoogle } from "@calcom/app-store/_utils/oauth/updateProfilePhotoGoogle"; import GoogleCalendarService from "@calcom/app-store/googlecalendar/lib/CalendarService"; import { renewSelectedCalendarCredentialId } from "@calcom/lib/connectedCalendar"; -import { - GOOGLE_CALENDAR_SCOPES, - SCOPE_USERINFO_PROFILE, - WEBAPP_URL, - WEBAPP_URL_FOR_OAUTH, -} from "@calcom/lib/constants"; +import { GOOGLE_CALENDAR_SCOPES, WEBAPP_URL, WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants"; import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl"; import { HttpError } from "@calcom/lib/http-error"; import { defaultHandler } from "@calcom/lib/server/defaultHandler"; @@ -101,9 +95,10 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) { } // Only attempt to update the user's profile photo if the user has granted the required scope - if (grantedScopes.includes(SCOPE_USERINFO_PROFILE)) { - await updateProfilePhotoGoogle(oAuth2Client, req.session.user.id); - } + // TODO: Use the avatarUrl when setting the profile picture + // if (grantedScopes.includes(SCOPE_USERINFO_PROFILE)) { + // await updateProfilePhotoGoogle(oAuth2Client, req.session.user.id); + // } const selectedCalendarWhereUnique = { userId: req.session.user.id,