fix: handle yet another action format

This commit is contained in:
Kjell Winblad 2024-06-20 10:03:49 +02:00
parent 4a318f8f51
commit 12859b8959
2 changed files with 8 additions and 1 deletions

View File

@ -43,7 +43,8 @@
args => action_fun_args()
}
| bridge_channel_id()
| {bridge_v2, emqx_bridge_v2:bridge_v2_type(), emqx_bridge_v2:bridge_v2_name()}.
| {bridge_v2, emqx_bridge_v2:bridge_v2_type(), emqx_bridge_v2:bridge_v2_name()}
| {bridge, emqx_utils_maps:config_key(), emqx_utils_maps:config_key(), bridge_channel_id()}.
-type rule() ::
#{

View File

@ -96,6 +96,12 @@ format_action(BridgeChannelId) when is_binary(BridgeChannelId) ->
" Type: data-bridge\n"
,[BridgeChannelId]
);
format_action({bridge, ActionType, ActionName, _Id}) ->
io_lib:format("- Name: ~p\n"
" Action Type: ~p\n"
" Type: data-bridge\n"
,[ActionName, ActionType]
);
format_action({bridge_v2, ActionType, ActionName}) ->
io_lib:format("- Name: ~p\n"
" Action Type: ~p\n"