Skip to content

Commit

Permalink
fix: Allow to start recurrence for existing Standups (#9909)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch authored Jul 2, 2024
1 parent c67a6a8 commit ae577e2
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,17 @@ const updateRecurrenceSettings: MutationResolvers['updateRecurrenceSettings'] =
if (!meeting) {
return standardError(new Error('Meeting not found'), {userId: viewerId})
}
const {teamId, meetingSeriesId} = meeting
if (!meetingSeriesId) {
return standardError(new Error('Meeting is not recurring'), {userId: viewerId})
}
const {teamId, meetingType, meetingSeriesId} = meeting
if (!isTeamMember(authToken, teamId)) {
return standardError(new Error('Team not found'), {userId: viewerId})
}

if (meeting.meetingSeriesId) {
const meetingSeries = await dataLoader.get('meetingSeries').loadNonNull(meeting.meetingSeriesId)
if (meetingType !== 'teamPrompt' && meetingType !== 'retrospective') {
return standardError(new Error('Recurring meeting type is not implemented'), {userId: viewerId})
}

if (meetingSeriesId) {
const meetingSeries = await dataLoader.get('meetingSeries').loadNonNull(meetingSeriesId)
const {gcalSeriesId, teamId, facilitatorId, recurrenceRule} = meetingSeries

if (!recurrenceSettings.rrule) {
Expand Down

0 comments on commit ae577e2

Please sign in to comment.