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 @@ -136,19 +136,24 @@ function processTrackEventData(
136136 } ) ;
137137}
138138
139- function processOutgoingLinkData (
139+ async function processOutgoingLinkData (
140140 linkData : any ,
141141 clientId : string
142- ) : CustomOutgoingLink {
142+ ) : Promise < CustomOutgoingLink > {
143143 const timestamp = parseTimestamp ( linkData . timestamp ) ;
144144
145+ const salt = await getDailySalt ( ) ;
146+
147+ let anonymousId = sanitizeString (
148+ linkData . anonymousId ,
149+ VALIDATION_LIMITS . SHORT_STRING_MAX_LENGTH
150+ ) ;
151+ anonymousId = saltAnonymousId ( anonymousId , salt ) ;
152+
145153 return {
146154 id : randomUUID ( ) ,
147155 client_id : clientId ,
148- anonymous_id : sanitizeString (
149- linkData . anonymousId ,
150- VALIDATION_LIMITS . SHORT_STRING_MAX_LENGTH
151- ) ,
156+ anonymous_id : anonymousId ,
152157 session_id : validateSessionId ( linkData . sessionId ) ,
153158 href : sanitizeString ( linkData . href , VALIDATION_LIMITS . PATH_MAX_LENGTH ) ,
154159 text : sanitizeString ( linkData . text , VALIDATION_LIMITS . TEXT_MAX_LENGTH ) ,
You can’t perform that action at this time.
0 commit comments