Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

Commit a964232

Browse files
committed
fix regex
1 parent 6966dd2 commit a964232

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mqtt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export async function setup() {
5757
})
5858
client.on("message", async function (topic, message) {
5959
const { deviceId, msgTopic } =
60-
/^devs\/(?<deviceId>.+?)\/(?<msgTopic>.+)$/.exec(topic)?.groups ||
61-
{}
60+
/^devs\/to\/(?<deviceId>.+?)\/(?<msgTopic>.+)$/.exec(topic)
61+
?.groups || {}
6262
if (!deviceId || !msgTopic) return // unknown topic
6363
const did: DeviceId = {
6464
partitionKey: defaultPartition,

0 commit comments

Comments
 (0)