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)); } }