Skip to content

Commit

Permalink
XMR: fix relayMessages setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
dasgarner committed Jan 13, 2025
1 parent 6ed3ecc commit e48d4c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ echo ' "queueSize": '$XMR_QUEUE_SIZE',' >> /opt/xmr/config.json
echo ' "debug": '$XMR_DEBUG',' >> /opt/xmr/config.json
echo ' "ipv6PubSupport": '$XMR_IPV6PUBSUPPORT',' >> /opt/xmr/config.json
echo ' "relayOldMessages": "'$XMR_RELAY_OLD_MESSAGES'",' >> /opt/xmr/config.json
echo ' "relayMessages": '$XMR_RELAY_MESSAGES >> /opt/xmr/config.json
echo ' "relayMessages": "'$XMR_RELAY_MESSAGES'"' >> /opt/xmr/config.json
echo '}' >> /opt/xmr/config.json

/usr/local/bin/php /opt/xmr/index.php
8 changes: 4 additions & 4 deletions src/Controller/Relay.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2024 Xibo Signage Ltd
* Copyright (C) 2025 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
Expand Down Expand Up @@ -39,7 +39,7 @@ public function __construct(
private string $relayOldMessages,
) {
// Create a client for us to use
if (!empty($this->relayMessages)) {
if (!empty($this->relayMessages) && $this->relayMessages !== 'false') {
$this->client = new Client([
'base_uri' => $this->relayMessages,
]);
Expand All @@ -66,12 +66,12 @@ public function configureZmq(): void

public function isRelay(): bool
{
return !empty($this->relayMessages);
return !empty($this->relayMessages) && $this->relayMessages !== 'false';
}

public function isRelayOld(): bool
{
return !empty($this->relayOldMessages);
return !empty($this->relayOldMessages) && $this->relayOldMessages !== 'false';
}

/**
Expand Down

0 comments on commit e48d4c8

Please sign in to comment.