|
|
|
@ -85,7 +85,7 @@ class RoomController extends AbstractController
@@ -85,7 +85,7 @@ class RoomController extends AbstractController
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Set identicon if not anonymous user |
|
|
|
|
if ($post['key'] === 'anonymous') |
|
|
|
|
if ($post['key'] === '@anonymous') |
|
|
|
|
{ |
|
|
|
|
$icon = false; |
|
|
|
|
} |
|
|
|
@ -331,8 +331,18 @@ class RoomController extends AbstractController
@@ -331,8 +331,18 @@ class RoomController extends AbstractController
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// @TODO Send message to DHT |
|
|
|
|
|
|
|
|
|
// Send message to DHT |
|
|
|
|
if ( |
|
|
|
|
$client->kevaPut( |
|
|
|
|
$request->get('namespace'), |
|
|
|
|
sprintf( |
|
|
|
|
'@%s', |
|
|
|
|
$request->get('user') === 'ip' ? $request->getClientIp() : 'anonymous' |
|
|
|
|
), |
|
|
|
|
$request->get('message') |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
// Register event time |
|
|
|
|
$memcached->set( |
|
|
|
|
$memory['app.add.post.remote.ip.delay'], |
|
|
|
@ -350,4 +360,15 @@ class RoomController extends AbstractController
@@ -350,4 +360,15 @@ class RoomController extends AbstractController
|
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Something went wrong, return error message |
|
|
|
|
return $this->redirectToRoute( |
|
|
|
|
'room_namespace', |
|
|
|
|
[ |
|
|
|
|
'namespace' => $request->get('namespace'), |
|
|
|
|
'message' => $request->get('message'), |
|
|
|
|
'error' => $translator->trans('Internal error! Please feedback') |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |