From d5f4a19cc31e19b1ab7b04bf58b12696bcff72f9 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 11 Nov 2018 19:06:53 +0100 Subject: [PATCH] fix(core): update --- ts/sl.classes.smartlogreceiver.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/sl.classes.smartlogreceiver.ts b/ts/sl.classes.smartlogreceiver.ts index e2d7135..0a6d254 100644 --- a/ts/sl.classes.smartlogreceiver.ts +++ b/ts/sl.classes.smartlogreceiver.ts @@ -27,15 +27,17 @@ export class SmartlogReceiver { /** * handles a authenticated log */ - handleAuthenticatedLog(authenticatedLogPackageArg: ILogPackageAuthenticated) { + async handleAuthenticatedLog(authenticatedLogPackageArg: ILogPackageAuthenticated) { const authString = authenticatedLogPackageArg.auth; const logPackage = authenticatedLogPackageArg.logPackage; if(authString === plugins.smarthash.sha256FromStringSync(this.passphrase)) { // this.smartlogInstance.log('ok', 'Message accepted'); this.smartlogInstance.handleLogPackage(logPackage); + return { status: 'ok' }; } else { this.smartlogInstance.log('error', 'Message rejected because of bad passphrase'); + return { status: 'error' }; // console.log(plugins.smarthash.sha256FromStringSync(this.passphrase)); } }