@@ -78,12 +78,13 @@ async function LEGACY_createVideoReference(
78
78
79
79
const newVideoReferenceId = generateId ( ) ;
80
80
81
- // we assume this is a legacy request.
81
+ // we assume this is a legacy request. Copy the legacy video to the new
82
+ // video reference location
82
83
await movePrivateInviteVideoToPublicBucket ( {
83
84
config,
84
85
storage,
85
86
newVideoReferenceId,
86
- privateVideoToken : legacyBody . videoToken , // old behavior was that invite token is video token
87
+ privateVideoToken : legacyBody . videoToken ,
87
88
removeOriginal : false
88
89
} ) ;
89
90
@@ -129,7 +130,8 @@ export const sendInvite = ({
129
130
throw new InviterMustBeInvitedError ( ) ;
130
131
}
131
132
132
- // TODO: once legacy code above is removed, check for videoReference too
133
+ // TODO: LEGACY [explicit-video-refs] once legacy code below is removed,
134
+ // check for videoReference too
133
135
const requiredParams = {
134
136
inviteEmail,
135
137
// videoReference,
@@ -142,14 +144,16 @@ export const sendInvite = ({
142
144
throw new MissingParamsError ( missingParams ) ;
143
145
}
144
146
145
- // TODO: replace with just createVideoReference once legacy support dropped
147
+ // TODO: LEGACY [explicit-video-refs] replace with just createVideoReference
148
+ // once legacy support dropped
146
149
// const videoReference = createVideoReference(call.body.videoReference);
147
150
const videoReference = await LEGACY_createVideoReference (
148
151
config ,
149
152
storage ,
150
153
call . body
151
154
) ;
152
- // separate ID to avoid temptation to address invites by videos/vice versa
155
+ // separate ID from video token to avoid temptation to address invites by
156
+ // videos/vice versa
153
157
const inviteToken = generateId ( ) ;
154
158
155
159
const newInvite : OperationToInsert = {
0 commit comments