|
|
@ -120,12 +120,43 @@ class ModuleController extends AbstractController |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Format quoted message |
|
|
|
|
|
|
|
if (preg_match('/^[A-z0-9]{64}$/', $request->get('txid'))) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$message = str_replace( |
|
|
|
|
|
|
|
[ |
|
|
|
|
|
|
|
sprintf( |
|
|
|
|
|
|
|
'@%s', |
|
|
|
|
|
|
|
$request->get('txid') |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
false, |
|
|
|
|
|
|
|
$request->get('message') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$message = trim( |
|
|
|
|
|
|
|
$message |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$message = sprintf( |
|
|
|
|
|
|
|
'@%s%s%s', |
|
|
|
|
|
|
|
$request->get('txid'), |
|
|
|
|
|
|
|
PHP_EOL, |
|
|
|
|
|
|
|
$request->get('message') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$message = $request->get('message'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $this->render( |
|
|
|
return $this->render( |
|
|
|
'default/module/post.html.twig', |
|
|
|
'default/module/post.html.twig', |
|
|
|
[ |
|
|
|
[ |
|
|
|
'enabled' => in_array($request->get('namespace'), $public), |
|
|
|
'enabled' => in_array($request->get('namespace'), $public), |
|
|
|
'namespace' => $request->get('namespace'), |
|
|
|
'namespace' => $request->get('namespace'), |
|
|
|
'message' => $request->get('message'), |
|
|
|
'message' => $message, |
|
|
|
'user' => $request->get('user'), |
|
|
|
'user' => $request->get('user'), |
|
|
|
'ip' => $request->getClientIp() |
|
|
|
'ip' => $request->getClientIp() |
|
|
|
] |
|
|
|
] |
|
|
|