fix: repair types

This commit is contained in:
Thomas Nordquist
2024-05-23 16:29:58 +02:00
parent c88978f0dd
commit a2c4388c78
19 changed files with 180 additions and 110 deletions

View File

@@ -98,7 +98,7 @@ export class MqttSource implements DataSource<MqttOptions> {
public publish(msg: MqttMessage) {
if (this.client) {
this.client.publish(msg.topic, msg.payload?.toBuffer() ?? '', {
this.client.publish(msg.topic, (msg.payload && new Base64Message(msg.payload))?.toBuffer() ?? '', {
qos: msg.qos,
retain: msg.retain,
})