Enable notifications by default if an interface doesn't require authentication
This commit is contained in:
parent
f68d47c5a8
commit
ec5da8db07
@ -446,11 +446,11 @@ void JsonRPCServer::registerHandler(JsonHandler *handler)
|
|||||||
|
|
||||||
void JsonRPCServer::clientConnected(const QUuid &clientId)
|
void JsonRPCServer::clientConnected(const QUuid &clientId)
|
||||||
{
|
{
|
||||||
// Notifications disabled by default. Clients must enable them with a valid token
|
|
||||||
m_clients.insert(clientId, false);
|
|
||||||
|
|
||||||
TransportInterface *interface = qobject_cast<TransportInterface *>(sender());
|
TransportInterface *interface = qobject_cast<TransportInterface *>(sender());
|
||||||
|
|
||||||
|
// If authentication is required, notifications are disabled by default. Clients must enable them with a valid token
|
||||||
|
m_clients.insert(clientId, !interface->configuration().authenticationEnabled);
|
||||||
|
|
||||||
QVariantMap handshake;
|
QVariantMap handshake;
|
||||||
handshake.insert("id", 0);
|
handshake.insert("id", 0);
|
||||||
handshake.insert("server", "guhIO");
|
handshake.insert("server", "guhIO");
|
||||||
|
|||||||
Reference in New Issue
Block a user