Update subscribers last engagement when they create new order

[MAILPOET-3762]
This commit is contained in:
Rostislav Wolny
2021-08-31 15:47:39 +02:00
committed by Veljko V
parent b215ab13c8
commit 62ae0db39e
6 changed files with 145 additions and 2 deletions

View File

@@ -308,7 +308,7 @@ class SubscribersRepository extends Repository {
->getResult();
}
public function maybeUpdateLastEngagement(SubscriberEntity $subscriberEntity, ?UserAgentEntity $userAgent): void {
public function maybeUpdateLastEngagement(SubscriberEntity $subscriberEntity, ?UserAgentEntity $userAgent = null): void {
if ($userAgent instanceof UserAgentEntity && $userAgent->getUserAgentType() === UserAgentEntity::USER_AGENT_TYPE_MACHINE) {
return;
}