fix(core): update

This commit is contained in:
2019-09-01 17:04:25 +02:00
parent e8f09c1b7a
commit 52db86c929
11 changed files with 60 additions and 28 deletions
+12 -3
View File
@@ -126,14 +126,23 @@ export class Universe {
socketConnectionArg
);
if (universeConnection) {
plugins.smartlog.defaultLogger.log('ok', 'found UniverseConnection for socket for incoming message');
plugins.smartlog.defaultLogger.log(
'ok',
'found UniverseConnection for socket for incoming message'
);
} else {
plugins.smartlog.defaultLogger.log('warn', 'found no Authorized channel for incoming message');
plugins.smartlog.defaultLogger.log(
'warn',
'found no Authorized channel for incoming message'
);
return {
error: 'You need to authenticate for a channel'
};
}
const unauthenticatedMessage = UniverseMessage.createMessageFromPayload(socketConnectionArg, dataArg);
const unauthenticatedMessage = UniverseMessage.createMessageFromPayload(
socketConnectionArg,
dataArg
);
const foundChannel = await UniverseChannel.authorizeAMessageForAChannel(
this.universeCache,
unauthenticatedMessage