fix(sys): compatible with binary type protocol
This commit is contained in:
parent
13e4feef13
commit
6a4d823b24
|
@ -365,10 +365,13 @@ event_topic(Event, #{clientid := ClientId, protocol := GwName}) ->
|
||||||
[
|
[
|
||||||
systop("gateway"),
|
systop("gateway"),
|
||||||
"/",
|
"/",
|
||||||
atom_to_binary(GwName),
|
bin(GwName),
|
||||||
"/clients/",
|
"/clients/",
|
||||||
ClientId,
|
ClientId,
|
||||||
"/",
|
"/",
|
||||||
atom_to_binary(Event)
|
bin(Event)
|
||||||
]
|
]
|
||||||
).
|
).
|
||||||
|
|
||||||
|
bin(A) when is_atom(A) -> atom_to_binary(A);
|
||||||
|
bin(B) when is_binary(B) -> B.
|
||||||
|
|
Loading…
Reference in New Issue