From 014bc64d3b30cb4e26b584f8ceb2224fefb3c64e Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Wed, 6 Sep 2023 16:12:18 -0300 Subject: [PATCH] chore: ensure general prop is a binary --- apps/emqx_rule_engine/src/emqx_rule_actions.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/emqx_rule_engine/src/emqx_rule_actions.erl b/apps/emqx_rule_engine/src/emqx_rule_actions.erl index a83902aad..ce74203a4 100644 --- a/apps/emqx_rule_engine/src/emqx_rule_actions.erl +++ b/apps/emqx_rule_engine/src/emqx_rule_actions.erl @@ -327,4 +327,5 @@ coerce_properties_values(MQTTProperties, #{metadata := #{rule_id := RuleId}}) -> encode_mqtt_property('Payload-Format-Indicator', V) -> ensure_int(V); encode_mqtt_property('Message-Expiry-Interval', V) -> ensure_int(V); encode_mqtt_property('Subscription-Identifier', V) -> ensure_int(V); -encode_mqtt_property(_Prop, V) -> V. +%% note: `emqx_placeholder:proc_tmpl/2' currently always return a binary. +encode_mqtt_property(_Prop, V) when is_binary(V) -> V.