chore: make static_check happy
This commit is contained in:
parent
73c4838c77
commit
3038ded59e
|
|
@ -110,28 +110,24 @@ type_to_qos(coap, #coap_message{type = Type}) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_publish_opts(Msg) ->
|
get_publish_opts(Msg) ->
|
||||||
case emqx_coap_message:extract_uri_query(Msg) of
|
Qs = emqx_coap_message:extract_uri_query(Msg),
|
||||||
undefined ->
|
maps:fold(
|
||||||
#{};
|
fun
|
||||||
Qs ->
|
(<<"retain">>, V, Acc) ->
|
||||||
maps:fold(
|
Val = V =:= <<"true">>,
|
||||||
fun
|
Acc#{retain => Val};
|
||||||
(<<"retain">>, V, Acc) ->
|
(<<"expiry">>, V, Acc) ->
|
||||||
Val = V =:= <<"true">>,
|
Val = erlang:binary_to_integer(V),
|
||||||
Acc#{retain => Val};
|
Acc#{expiry_interval => Val};
|
||||||
(<<"expiry">>, V, Acc) ->
|
(<<"qos">>, V, Acc) ->
|
||||||
Val = erlang:binary_to_integer(V),
|
Val = erlang:binary_to_integer(V),
|
||||||
Acc#{expiry_interval => Val};
|
Acc#{qos => Val};
|
||||||
(<<"qos">>, V, Acc) ->
|
(_, _, Acc) ->
|
||||||
Val = erlang:binary_to_integer(V),
|
Acc
|
||||||
Acc#{qos => Val};
|
end,
|
||||||
(_, _, Acc) ->
|
#{},
|
||||||
Acc
|
Qs
|
||||||
end,
|
).
|
||||||
#{},
|
|
||||||
Qs
|
|
||||||
)
|
|
||||||
end.
|
|
||||||
|
|
||||||
get_publish_qos(Msg, PublishOpts) ->
|
get_publish_qos(Msg, PublishOpts) ->
|
||||||
case PublishOpts of
|
case PublishOpts of
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue