File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public TestAmplitudeEvent(string dummyApiKey) : base(EVENT_TYPE)
20
20
public void SwapHttpClientHandler ( HttpMessageHandler mockHandler )
21
21
{
22
22
HttpMessageHandler = mockHandler ;
23
+ BypassConsentRequirement = true ;
23
24
}
24
25
}
25
26
}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public abstract class AmplitudeEvent
17
17
private static readonly int _systemRAM = ( int ) ( GC . GetGCMemoryInfo ( ) . TotalAvailableMemoryBytes / 1048576.0 /*magic number*/ ) ;
18
18
19
19
protected HttpMessageHandler HttpMessageHandler { get ; set ; } = new HttpClientHandler ( ) ;
20
+ protected bool BypassConsentRequirement { get ; set ; }
20
21
21
22
[ JsonIgnore ]
22
23
public string DeviceId => AppSettings . AnalyticsDeviceId . ToString ( ) ;
@@ -48,7 +49,7 @@ public async Task<bool> Record()
48
49
{
49
50
try
50
51
{
51
- if ( AMPLITUDE_API_KEY . Length == 0 || ! AppSettings . AnalyticsDataGatheringConsent )
52
+ if ( ! BypassConsentRequirement && ( AMPLITUDE_API_KEY . Length == 0 || ! AppSettings . AnalyticsDataGatheringConsent ) )
52
53
return false ;
53
54
54
55
var request = new
You can’t perform that action at this time.
0 commit comments