Always use absolute URL for an invitation thread

Fixes 52
This commit is contained in:
Dmitriy Simushev 2014-07-29 14:09:23 +00:00
parent 9e08c6f2a5
commit a8e98c1e08

View File

@ -22,6 +22,7 @@ use Mibew\Settings;
use Mibew\Thread; use Mibew\Thread;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/** /**
* Processes widget requests. * Processes widget requests.
@ -121,7 +122,11 @@ class WidgetController extends AbstractController
$response_data['data']['invitation'] = array( $response_data['data']['invitation'] = array(
'operatorName' => htmlspecialchars($operator_name), 'operatorName' => htmlspecialchars($operator_name),
'avatarUrl' => htmlspecialchars($operator['vcavatar']), 'avatarUrl' => htmlspecialchars($operator['vcavatar']),
'threadUrl' => $this->generateUrl('chat_user_invitation'), 'threadUrl' => $this->generateUrl(
'chat_user_invitation',
array(),
UrlGeneratorInterface::ABSOLUTE_URL
),
'acceptCaption' => getlocal('Answer'), 'acceptCaption' => getlocal('Answer'),
); );