We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebf3279 commit 405a7d7Copy full SHA for 405a7d7
src/mqtt.ts
@@ -18,7 +18,6 @@ export async function startAdafruitIOMQTTClient(options?: UserOptions) {
18
host: "io.adafruit.com",
19
port: 8883,
20
})
21
- ;(client as any).__user = user
22
return client
23
}
24
@@ -33,7 +32,7 @@ export async function publishData(
33
32
options?: FeedOptions
34
) {
35
const { feed, lon, lat, ele } = await loadFeedOptions(options)
36
- const user = (client as any).__user as string
+ const user = client.opt.username
37
const topic = `${user}/f/${feed}/json`
38
const payload: any = { value }
39
if (lon !== undefined) payload.lon = lon
0 commit comments