Browse Source

chore: ensure general prop is a binary

Thales Macedo Garitezi 2 years ago
parent
commit
014bc64d3b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      apps/emqx_rule_engine/src/emqx_rule_actions.erl

+ 2 - 1
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('Payload-Format-Indicator', V) -> ensure_int(V);
 encode_mqtt_property('Message-Expiry-Interval', 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('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.