Преглед изворни кода

fix: mqtt bridge payload default value

JimMoen пре 3 година
родитељ
комит
b5bf5d3adb
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 0
      CHANGES-5.0.md
  2. 2 2
      apps/emqx_connector/src/mqtt/emqx_connector_mqtt_schema.erl

+ 1 - 0
CHANGES-5.0.md

@@ -13,6 +13,7 @@
 * Fix that redis authn will deny the unknown users [#8934](https://github.com/emqx/emqx/pull/8934)
 * Fix ExProto UDP client keepalive checking error.
   This causes the clients to not expire as long as a new UDP packet arrives [#8866](https://github.com/emqx/emqx/pull/8866)
+* Fix that MQTT Bridge message payload could be empty string. [#8949](https://github.com/emqx/emqx/pull/8949)
 
 ## Enhancements
 

+ 2 - 2
apps/emqx_connector/src/mqtt/emqx_connector_mqtt_schema.erl

@@ -177,7 +177,7 @@ fields("ingress") ->
             sc(
                 binary(),
                 #{
-                    default => <<"${payload}">>,
+                    default => undefined,
                     desc => ?DESC("payload")
                 }
             )}
@@ -224,7 +224,7 @@ fields("egress") ->
             sc(
                 binary(),
                 #{
-                    default => <<"${payload}">>,
+                    default => undefined,
                     desc => ?DESC("payload")
                 }
             )}