Improved affiliate entity logic.

This commit is contained in:
DebaucheryLibrarian 2026-01-23 03:03:45 +01:00
parent 559dc21189
commit bf802771de
1 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,10 @@ export function getAffiliateEntityUrl(entity) {
return entity.url;
}
if (new URL(entity.url).hostname !== new URL(entity.affiliate.url).hostname) {
return entity.url;
}
if (entity.affiliate.url?.includes('/track')
&& entity.affiliate.parameters.channel !== false) {
const { pathname, search } = new URL(entity.url);