From 75923af08219e5eaa685ea548140253860163acb Mon Sep 17 00:00:00 2001 From: Sebastian Clausen Date: Sun, 2 Jul 2023 13:01:50 +0200 Subject: [PATCH] fix: added payload to onPacketreceive and onPacketsend. Fixes #235 --- projects/ngx-mqtt/package.json | 2 +- projects/ngx-mqtt/src/lib/mqtt.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/ngx-mqtt/package.json b/projects/ngx-mqtt/package.json index 1052610..131f3f0 100644 --- a/projects/ngx-mqtt/package.json +++ b/projects/ngx-mqtt/package.json @@ -1,6 +1,6 @@ { "name": "ngx-mqtt", - "version": "16.0.0", + "version": "16.1.0", "license": "MIT", "peerDependencies": { "@angular/common": "^16.0.3", diff --git a/projects/ngx-mqtt/src/lib/mqtt.service.ts b/projects/ngx-mqtt/src/lib/mqtt.service.ts index 57516aa..0d05573 100644 --- a/projects/ngx-mqtt/src/lib/mqtt.service.ts +++ b/projects/ngx-mqtt/src/lib/mqtt.service.ts @@ -400,11 +400,11 @@ export class MqttService { } private _handleOnPacketsend = (e: IOnPacketsendEvent) => { - this._onPacketsend.emit(); + this._onPacketsend.emit(e); } private _handleOnPacketreceive = (e: IOnPacketreceiveEvent) => { - this._onPacketreceive.emit(); + this._onPacketreceive.emit(e); } private _generateClientId() {