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,