Skip to content
Permalink
Browse files

Fix flags is null badmatch

  • Loading branch information
turtleDeng committed Nov 15, 2019
1 parent f647756 commit 3dd041afaf39eabe71ab473648d57f4b55735224
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/emqx_web_hook.erl
@@ -208,7 +208,7 @@ on_session_terminated(#{}, Reason, _Env) ->

on_message_publish(Message = #message{topic = <<"$SYS/", _/binary>>}, _Env) ->
{ok, Message};
on_message_publish(Message = #message{topic = Topic, flags = #{retain := Retain}}, {Filter}) ->
on_message_publish(Message = #message{topic = Topic, flags = Flags}, {Filter}) ->
with_filter(
fun() ->
emqx_metrics:inc('web_hook.message_publish'),
@@ -218,7 +218,7 @@ on_message_publish(Message = #message{topic = Topic, flags = #{retain := Retain}
{from_username, FromUsername},
{topic, Message#message.topic},
{qos, Message#message.qos},
{retain, Retain},
{retain, maps:get(retain, Flags, false)},
{payload, encode_payload(Message#message.payload)},
{ts, emqx_time:now_secs(Message#message.timestamp)}],
send_http_request(Params),

0 comments on commit 3dd041a

Please sign in to comment.
You can’t perform that action at this time.