Skip to content

Commit b504301

Browse files
authored
Disable setting profile picture (#22074)
1 parent b0999ab commit b504301

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

packages/app-store/googlecalendar/api/callback.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@ import { calendar_v3 } from "@googleapis/calendar";
22
import { OAuth2Client } from "googleapis-common";
33
import type { NextApiRequest, NextApiResponse } from "next";
44

5-
import { updateProfilePhotoGoogle } from "@calcom/app-store/_utils/oauth/updateProfilePhotoGoogle";
65
import GoogleCalendarService from "@calcom/app-store/googlecalendar/lib/CalendarService";
76
import { renewSelectedCalendarCredentialId } from "@calcom/lib/connectedCalendar";
8-
import {
9-
GOOGLE_CALENDAR_SCOPES,
10-
SCOPE_USERINFO_PROFILE,
11-
WEBAPP_URL,
12-
WEBAPP_URL_FOR_OAUTH,
13-
} from "@calcom/lib/constants";
7+
import { GOOGLE_CALENDAR_SCOPES, WEBAPP_URL, WEBAPP_URL_FOR_OAUTH } from "@calcom/lib/constants";
148
import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl";
159
import { HttpError } from "@calcom/lib/http-error";
1610
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
@@ -101,9 +95,10 @@ async function getHandler(req: NextApiRequest, res: NextApiResponse) {
10195
}
10296

10397
// Only attempt to update the user's profile photo if the user has granted the required scope
104-
if (grantedScopes.includes(SCOPE_USERINFO_PROFILE)) {
105-
await updateProfilePhotoGoogle(oAuth2Client, req.session.user.id);
106-
}
98+
// TODO: Use the avatarUrl when setting the profile picture
99+
// if (grantedScopes.includes(SCOPE_USERINFO_PROFILE)) {
100+
// await updateProfilePhotoGoogle(oAuth2Client, req.session.user.id);
101+
// }
107102

108103
const selectedCalendarWhereUnique = {
109104
userId: req.session.user.id,

0 commit comments

Comments
 (0)