This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Description
If I run the basic example provided:
const toad = require('mqttletoad');
(async function () {
const client = await toad.connect('wss://test.mosquitto.org', {
encoder: 'json',
decoder: 'json'
});
await client.subscribe('foo/bar', message => {
console.log(message.baz); // quux
});
// see listener above
await client.publish('foo/bar', {baz: 'quux'});
}());
The output is "undefined", meaning message.baz was not defined. If I inspect further, message = "[Object object]". It appears the default set to JSON encoding/decoding is ignored, or forced to be text.