We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac431a3 commit 3c7c942Copy full SHA for 3c7c942
1 file changed
nmqtt.nim
@@ -836,8 +836,9 @@ proc onPublish(ctx: MqttCtx, pkt: Pkt) {.async.} =
836
837
when not defined(broker):
838
for top, cb in ctx.pubCallbacks:
839
- if top == topic: cb.cb(topic, message)
840
- if top.endsWith("#"):
+ if top == topic or top == "#":
+ cb.cb(topic, message)
841
+ if top.endsWith("/#"):
842
var topicw = top
843
topicw.removeSuffix("#")
844
if topic.contains(topicw):
0 commit comments