|
|
|
@ -182,6 +182,20 @@ class Ratchet implements MessageComponentInterface
@@ -182,6 +182,20 @@ class Ratchet implements MessageComponentInterface
|
|
|
|
|
{ |
|
|
|
|
// Check message commit by dot |
|
|
|
|
if ($request == '.') |
|
|
|
|
{ |
|
|
|
|
// Check message not empty |
|
|
|
|
if (empty(trim($connection->message))) |
|
|
|
|
{ |
|
|
|
|
$connection->send( |
|
|
|
|
implode( |
|
|
|
|
PHP_EOL, |
|
|
|
|
$config->response->submit->failure->empty |
|
|
|
|
) . PHP_EOL |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Max length already checked on input, begin message save |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
// Save massage to KevaCoin blockchain |
|
|
|
|
if ($txid = $this->_kevacoin->kevaPut($this->_config->kevacoin->wallet->namespace, time(), $connection->message)) |
|
|
|
@ -243,6 +257,7 @@ class Ratchet implements MessageComponentInterface
@@ -243,6 +257,7 @@ class Ratchet implements MessageComponentInterface
|
|
|
|
|
) . PHP_EOL |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Close connection at this point |
|
|
|
|
$connection->close(); |
|
|
|
|