@@ -9,7 +9,7 @@ interface FeedbackParams {
99  attachments ?: Attachment [ ] ; 
1010  url ?: string ; 
1111  source ?: string ; 
12-   relatedEventId ?: string ; 
12+   associatedEventId ?: string ; 
1313} 
1414
1515/** 
@@ -19,7 +19,7 @@ export function captureFeedback(
1919  feedbackParams : FeedbackParams , 
2020  hint ?: EventHint  &  {  includeReplay ?: boolean  } , 
2121) : string  { 
22-   const  {  message,  name,  email,  url,  source,  attachments }  =  feedbackParams ; 
22+   const  {  message,  name,  email,  url,  source,  attachments,  associatedEventId  }  =  feedbackParams ; 
2323
2424  const  client  =  getClient ( ) ; 
2525  const  transport  =  client  &&  client . getTransport ( ) ; 
@@ -37,14 +37,13 @@ export function captureFeedback(
3737        message, 
3838        url, 
3939        source, 
40+         associated_event_id : associatedEventId , 
4041      } , 
4142    } , 
4243    type : 'feedback' , 
4344    level : 'info' , 
4445  } ; 
4546
46-   // TODO: What to do with `relatedEventId` ? 
47- 
4847  if  ( client )  { 
4948    client . emit ( 'beforeSendFeedback' ,  feedbackEvent ,  hint ) ; 
5049  } 
@@ -55,22 +54,17 @@ export function captureFeedback(
5554  // Because we do not support attachments in the feedback envelope 
5655  // Once the Sentry API properly supports this, we can get rid of this and send it through the event envelope 
5756  if  ( client  &&  attachments  &&  attachments . length )  { 
58-     const  transport  =  client . getTransport ( ) ; 
59-     const  dsn  =  client . getDsn ( ) ; 
60- 
61-     if  ( dsn  &&  transport )  { 
62-       // TODO: https://docs.sentry.io/platforms/javascript/enriching-events/attachments/ 
63-       // eslint-disable-next-line @typescript-eslint/no-floating-promises 
64-       void  transport . send ( 
65-         createAttachmentEnvelope ( 
66-           feedbackEvent , 
67-           attachments , 
68-           dsn , 
69-           client . getOptions ( ) . _metadata , 
70-           client . getOptions ( ) . tunnel , 
71-         ) , 
72-       ) ; 
73-     } 
57+     // TODO: https://docs.sentry.io/platforms/javascript/enriching-events/attachments/ 
58+     // eslint-disable-next-line @typescript-eslint/no-floating-promises 
59+     void  transport . send ( 
60+       createAttachmentEnvelope ( 
61+         feedbackEvent , 
62+         attachments , 
63+         dsn , 
64+         client . getOptions ( ) . _metadata , 
65+         client . getOptions ( ) . tunnel , 
66+       ) , 
67+     ) ; 
7468  } 
7569
7670  return  eventId ; 
0 commit comments