Commit 53ccb4e5 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): only record subscription if it actually subscribed

1 merge request!308WIP: (feat): Minds Pro
Pipeline #82523219 failed with stages
in 10 minutes and 22 seconds
......@@ -120,17 +120,17 @@ class authenticate implements Interfaces\Api, Interfaces\ApiIgnorePam
if (!$manager->isSubscribed($targetChannel)) {
$manager->subscribe($targetChannel);
}
//TODO: move Core/Subscriptions/Delegates
$event = new Core\Analytics\Metrics\Event();
$event->setType('action')
->setAction('subscribe')
->setProduct('platform')
->setUserGuid((string) Core\Session::getLoggedInUser()->guid)
->setUserPhoneNumberHash(Core\Session::getLoggedInUser()->getPhoneNumberHash())
->setEntityGuid((string) $from)
->push();
//TODO: move Core/Subscriptions/Delegates
$event = new Core\Analytics\Metrics\Event();
$event->setType('action')
->setAction('subscribe')
->setProduct('platform')
->setUserGuid((string) Core\Session::getLoggedInUser()->guid)
->setUserPhoneNumberHash(Core\Session::getLoggedInUser()->getPhoneNumberHash())
->setEntityGuid((string) $from)
->push();
}
}
$response['status'] = 'success';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment