hub location mercure adjustment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
831603e04e
commit
aa56617e50
@@ -12,7 +12,6 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Mercure\HubInterface;
|
||||
use Symfony\Component\Mercure\Update;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
|
||||
class GameResponseService
|
||||
{
|
||||
@@ -23,8 +22,6 @@ class GameResponseService
|
||||
private HubInterface $hub,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private string $projectDir,
|
||||
#[Autowire('%env(MERCURE_TOPIC_BASE)%')]
|
||||
private string $mercureTopicBase,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -336,7 +333,7 @@ class GameResponseService
|
||||
if(is_null($activeGame))
|
||||
return false;
|
||||
|
||||
$topic = $this->mercureTopicBase . '/game/hub-' . $activeGame;
|
||||
$topic = '/game/hub/' . $activeGame;
|
||||
try {
|
||||
$this->hub->publish(new Update($topic, json_encode([$sendTo, $message])));
|
||||
} catch (\Exception $e) {
|
||||
@@ -382,7 +379,7 @@ class GameResponseService
|
||||
$this->entityManager->flush();
|
||||
|
||||
// Notify the player that their codes have changed
|
||||
$topic = $this->mercureTopicBase . '/game/hub-' . $session->getId();
|
||||
$topic = '/game/hub/' . $session->getId();
|
||||
$notification = "Security Alert: One of your verify codes was shared and has been regenerated.";
|
||||
// We send it only to this player (screen)
|
||||
try {
|
||||
@@ -673,7 +670,7 @@ class GameResponseService
|
||||
$this->entityManager->persist($everyoneVerifiedSetting);
|
||||
$this->entityManager->flush();
|
||||
|
||||
$topic = $this->mercureTopicBase . '/game/hub-' . $session->getId();
|
||||
$topic = '/game/hub/' . $session->getId();
|
||||
$message = "Mainframe Help Modus: Agents Doyle, Vega and Lennox rapports have been updated with coded messages.";
|
||||
try {
|
||||
$this->hub->publish(new Update($topic, json_encode([0, $message])));
|
||||
|
||||
Reference in New Issue
Block a user