@@ -78,12 +78,13 @@ async function LEGACY_createVideoReference(
7878
7979 const newVideoReferenceId = generateId ( ) ;
8080
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
8283 await movePrivateInviteVideoToPublicBucket ( {
8384 config,
8485 storage,
8586 newVideoReferenceId,
86- privateVideoToken : legacyBody . videoToken , // old behavior was that invite token is video token
87+ privateVideoToken : legacyBody . videoToken ,
8788 removeOriginal : false
8889 } ) ;
8990
@@ -129,7 +130,8 @@ export const sendInvite = ({
129130 throw new InviterMustBeInvitedError ( ) ;
130131 }
131132
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
133135 const requiredParams = {
134136 inviteEmail,
135137 // videoReference,
@@ -142,14 +144,16 @@ export const sendInvite = ({
142144 throw new MissingParamsError ( missingParams ) ;
143145 }
144146
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
146149 // const videoReference = createVideoReference(call.body.videoReference);
147150 const videoReference = await LEGACY_createVideoReference (
148151 config ,
149152 storage ,
150153 call . body
151154 ) ;
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
153157 const inviteToken = generateId ( ) ;
154158
155159 const newInvite : OperationToInsert = {
0 commit comments