Using now "cached" on the TimestampListener instance was causing us to set createdAt and updatedAt slightly in the past.
It was potentially problematic in tests where the TimestampListener lives a long time or in long requests, such as a cron request.
[MAILPOET-6155]
This is a performance optimization to avoid fetching too many scheduled task rows.
Run is always created before the scheduled task which is created in send action step.
[MAILPOET-6155]
It is possible that one email (e.g., purchase in category) is sent multiple times
to the same subscriber.
AutomationEmailScheduler::getScheduledTaskSubscriber was selecting the task based on subscriber and newsletter.
In the case of multiple emails sent to one subscriber, the method failed to pick ScheduledTaskSubsrciberEntity because
the query was fetching multiple results, but getOneOrNullResult expects only one result.
This commit fixes it by adding additional filtering by $runId to get the ScheduledTaskSubsriberEntity associated
with the correct run.
I did the filtering in PHP because an alternative would be using LIKE %% in the query. The meta column is text.
[MAILPOET-6155]
This reduces the size of the files combined from 224KB to 64KB.
The command used was:
for f in originals/*.mp3; do ffmpeg -i "$f" -c:a libmp3lame -af "highpass=f=200, lowpass=f=15000, afftdn=nf=-30, anlmdn=s=1, rubberband=pitch=1.05, volume=1.5" -b:a 8k -ac 1 -ar 8000 "${f##*/}"; done
[MAILPOET-6038]
Previously, a new CAPTCHA phrase was generated when the CAPTCHA image
or audio was requested "again". For that, a counter needed to be stored in the
session, and since image and audio were fetched in parallel, any of them could
initialize the new CAPTCHA phrase. The problem appeared when they both
generated a new phrase at the same time. This resulted in a race condition,
where the image and audio had different CAPTCHA phrases and some users
weren't able to pass the CAPTCHA at all. This was occuring especially in Safari,
(maybe somehow due the type dectection range "preflight" request).
Now, the phrase is initialized on the CAPTCHA page load (and reloaded via AJAX),
so we don't need to store any additional metadata, apart from the phrase itself.
[MAILPOET-6038]x