Skip to content

Commit 3c7c942

Browse files
committed
Back original if
1 parent ac431a3 commit 3c7c942

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nmqtt.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@ proc onPublish(ctx: MqttCtx, pkt: Pkt) {.async.} =
836836

837837
when not defined(broker):
838838
for top, cb in ctx.pubCallbacks:
839-
if top == topic: cb.cb(topic, message)
840-
if top.endsWith("#"):
839+
if top == topic or top == "#":
840+
cb.cb(topic, message)
841+
if top.endsWith("/#"):
841842
var topicw = top
842843
topicw.removeSuffix("#")
843844
if topic.contains(topicw):

0 commit comments

Comments
 (0)