From 82800ec56f7f112c95389a6be4b74e8d801d82b3 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 8 Jun 2020 08:44:06 +0000 Subject: [PATCH] fix(core): update --- ts/sl.classes.smartlogreceiver.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/sl.classes.smartlogreceiver.ts b/ts/sl.classes.smartlogreceiver.ts index c5c773a..22cbefd 100644 --- a/ts/sl.classes.smartlogreceiver.ts +++ b/ts/sl.classes.smartlogreceiver.ts @@ -3,7 +3,7 @@ import * as plugins from './sl.receiver.plugins'; import { ILogPackage, ILogPackageAuthenticated, - ILogDestination + ILogDestination, } from '@pushrocks/smartlog-interfaces'; export type TValidatorFunction = (logPackage: ILogPackage) => boolean; @@ -36,7 +36,11 @@ export class SmartlogReceiver { const logPackage = authenticatedLogPackageArg.logPackage; if (authString === plugins.smarthash.sha256FromStringSync(this.passphrase)) { - // this.smartlogInstance.log('ok', 'Message accepted'); + // Message authenticated lets clean up. + logPackage.correlation ? null : (logPackage.correlation = { id: '123', type: 'none' }); + logPackage.correlation.id ? null : (logPackage.correlation.id = '123'); + logPackage.correlation.type ? null : (logPackage.correlation.type = 'none'); + this.smartlogInstance.handleLog(logPackage); return { status: 'ok' }; } else {