Skip to content

Rc/5.0.0#149

Open
martinzigrai wants to merge 19 commits into
masterfrom
rc/4.6.0
Open

Rc/5.0.0#149
martinzigrai wants to merge 19 commits into
masterfrom
rc/4.6.0

Conversation

@martinzigrai
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/api/methods/native.ts Outdated
Comment on lines +17 to +42
const withSuspiciousAppDetectionDefaults = (
config: SuspiciousAppDetectionConfig
): SuspiciousAppDetectionConfig => ({
...config,
malwareScanScope: config.malwareScanScope ?? DEFAULT_MALWARE_SCAN_SCOPE,
reasonMode: config.reasonMode ?? DEFAULT_REASON_MODE,
});

const normalizeAndroidConfig = (
androidConfig: TalsecAndroidConfig
): TalsecAndroidConfig => {
if (!androidConfig.suspiciousAppDetectionConfig) {
return androidConfig;
}
return {
...androidConfig,
suspiciousAppDetectionConfig: withSuspiciousAppDetectionDefaults(
androidConfig.suspiciousAppDetectionConfig
),
};
};

const normalizeConfig = (options: TalsecConfig): TalsecConfig => ({
...options,
androidConfig: options.androidConfig
? normalizeAndroidConfig(options.androidConfig)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods should not be part of the API, maybe could we move them to utils?

@martinzigrai martinzigrai changed the title Rc/4.6.0 Rc/5.0.0 May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants