File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -141,19 +141,24 @@ function processTrackEventData(
141141 } ) ;
142142}
143143
144- function processOutgoingLinkData (
144+ async function processOutgoingLinkData (
145145 linkData : any ,
146146 clientId : string
147- ) : CustomOutgoingLink {
147+ ) : Promise < CustomOutgoingLink > {
148148 const timestamp = parseTimestamp ( linkData . timestamp ) ;
149149
150+ const salt = await getDailySalt ( ) ;
151+
152+ let anonymousId = sanitizeString (
153+ linkData . anonymousId ,
154+ VALIDATION_LIMITS . SHORT_STRING_MAX_LENGTH
155+ ) ;
156+ anonymousId = saltAnonymousId ( anonymousId , salt ) ;
157+
150158 return {
151159 id : randomUUID ( ) ,
152160 client_id : clientId ,
153- anonymous_id : sanitizeString (
154- linkData . anonymousId ,
155- VALIDATION_LIMITS . SHORT_STRING_MAX_LENGTH
156- ) ,
161+ anonymous_id : anonymousId ,
157162 session_id : validateSessionId ( linkData . sessionId ) ,
158163 href : sanitizeString ( linkData . href , VALIDATION_LIMITS . PATH_MAX_LENGTH ) ,
159164 text : sanitizeString ( linkData . text , VALIDATION_LIMITS . TEXT_MAX_LENGTH ) ,
You can’t perform that action at this time.
0 commit comments