File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
cloud/functions/src/functions/firestore/services Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -136,12 +136,15 @@ async function deleteUserRefIncludingChildren(userRef: DocumentReference<Documen
136136 }
137137
138138 const preferencesDoc = await db . doc ( `${ userRef . path } /preferences/self` ) . get ( )
139+ // For legacy reasons
140+ const legacyLastConnectionDoc = await db . doc ( `${ userRef . path } /last-connection/self` ) . get ( )
139141
140142 await Promise . all ( [
141143 deleteUserSpaces ( userRef , { dryRun } ) ,
142144 deleteUserEventsFromNode ( userRef , { dryRun } ) ,
143145 ...( ( preferencesDoc . exists && ! dryRun ) ? [ preferencesDoc . ref . delete ( ) ] :[ ] ) ,
144146 ...( ( tokensWalletDoc . exists && ! dryRun ) ? [ tokensWalletDoc . ref . delete ( ) ] :[ ] ) ,
147+ ...( ( legacyLastConnectionDoc . exists && ! dryRun ) ? [ legacyLastConnectionDoc . ref . delete ( ) ] :[ ] ) ,
145148 ] )
146149
147150 console . info ( `Deleting user entry ${ userRef . path } ` )
You can’t perform that action at this time.
0 commit comments