Skip to content

fix issue with redirecting to intended links after tracking#258

Open
Khuthaily wants to merge 1 commit into
jdavidbakr:masterfrom
Khuthaily:patch-2
Open

fix issue with redirecting to intended links after tracking#258
Khuthaily wants to merge 1 commit into
jdavidbakr:masterfrom
Khuthaily:patch-2

Conversation

@Khuthaily
Copy link
Copy Markdown
Contributor

The PR improves the getDomainsInContextAttribute() method by (1) extracting domains (including decoded URLs and subdomains) from the content (if the content is logged) and (2) allowing the developer to add their own list of domains in case they have chosen not to log the content.

The PR improves the getDomainsInContextAttribute() method by (1) extracting domains (including decoded URLs and subdomains) from the content (if the content is logged) and (2) allowing the developer to add their own list of domains in case they have chosen not to log the content.
Comment thread src/Model/SentEmail.php
} else {
// If the content of the email is not logged in the sent_emails table,
// return an array of the domains you are tracking in your email.
$domains = [];
Copy link
Copy Markdown
Contributor

@bretto36 bretto36 Jul 2, 2025

Choose a reason for hiding this comment

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

So providing an empty array means it will never redirect to the correct url

the second part of this if is always true so it's always going to redirect to the missing links thing

if ( ! $tracker || empty($tracker->domains_in_context) || ! in_array($url_host, $tracker->domains_in_context) ){
            return redirect(config('mail-tracker.redirect-missing-links-to') ?: '/');
        }

@bretto36 bretto36 mentioned this pull request Jul 2, 2025
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