|
|
@@ -179,11 +179,14 @@ on_remove_channel(
|
|
|
{ok, NewState}.
|
|
|
|
|
|
on_get_channel_status(
|
|
|
- _ResId,
|
|
|
- _ChannelId,
|
|
|
- _State
|
|
|
+ InstanceId,
|
|
|
+ ChannelId,
|
|
|
+ #{installed_channels := Channels} = State
|
|
|
) ->
|
|
|
- ?status_connected.
|
|
|
+ case maps:find(ChannelId, Channels) of
|
|
|
+ {ok, _} -> on_get_status(InstanceId, State);
|
|
|
+ error -> ?status_disconnected
|
|
|
+ end.
|
|
|
|
|
|
on_get_channels(ResId) ->
|
|
|
emqx_bridge_v2:get_channels_for_connector(ResId).
|