chore: update change logs

This commit is contained in:
Shawn 2023-05-16 13:48:04 +08:00
parent eafa36c3ae
commit b19136a12f
3 changed files with 16 additions and 5 deletions

View File

@ -92,7 +92,8 @@ on_client_connect(ConnInfo = #{clientid := ClientId, username := Username, peern
, username => maybe(Username)
, ipaddress => iolist_to_binary(ntoa(Peerhost))
},
send_http_request(ClientId, add_optional_conn_fields(Params, ConnInfo)).
OptFields = [keepalive, proto_ver],
send_http_request(ClientId, add_optional_conn_fields(Params, OptFields, ConnInfo)).
%%--------------------------------------------------------------------
%% Client connack
@ -107,7 +108,8 @@ on_client_connack(ConnInfo = #{clientid := ClientId, username := Username, peern
, ipaddress => iolist_to_binary(ntoa(Peerhost))
, conn_ack => Rc
},
send_http_request(ClientId, add_optional_conn_fields(Params, ConnInfo)).
OptFields = [keepalive, proto_ver, connected_at],
send_http_request(ClientId, add_optional_conn_fields(Params, OptFields, ConnInfo)).
%%--------------------------------------------------------------------
%% Client connected
@ -121,7 +123,8 @@ on_client_connected(#{clientid := ClientId, username := Username, peerhost := Pe
, username => maybe(Username)
, ipaddress => iolist_to_binary(ntoa(Peerhost))
},
send_http_request(ClientId, add_optional_conn_fields(Params, ConnInfo)).
OptFields = [keepalive, proto_ver, connected_at],
send_http_request(ClientId, add_optional_conn_fields(Params, OptFields, ConnInfo)).
%%--------------------------------------------------------------------
%% Client disconnected
@ -380,5 +383,5 @@ stringfy(Term) ->
maybe(undefined) -> null;
maybe(Str) -> Str.
add_optional_conn_fields(Fields, ConnInfo) ->
maps:merge(Fields, maps:with([keepalive, proto_ver, connected_at], ConnInfo)).
add_optional_conn_fields(Params, OptFields, ConnInfo) ->
maps:merge(Params, maps:with(OptFields, ConnInfo)).

View File

@ -33,3 +33,7 @@
Prior to the fix, the `date` variable exported by `FOREACH` could not be accessed in the `DO` clause of the above SQL, resulting in the following output for the SQL statement:
`[{"elem": "a","date": "undefined"}]`.
After the fix, the output of the SQL statement is: `[{"elem": "a","date": "2023-05-06"}]`
- Fixed an issue where the WebHook plugin failed to execute the `on_client_connack` hook [#10710](https://github.com/emqx/emqx/pull/10710).
See https://github.com/emqx/emqx/issues/10628 for more details.

View File

@ -33,3 +33,7 @@
修复前,以上 SQL 语句中 `FOREACH` 导出的 `date` 变量无法在 `DO` 子句中访问,导致以上 SQL 的输出为:
`[{"elem": "a","date": "undefined"}]`
修复后SQL 的输出为:`[{"elem": "a","date": "2023-05-06"}]`
- 修复 WebHook 插件执行 `on_client_connack` 钩子失败的问题 [#10710](https://github.com/emqx/emqx/pull/10710)。
详见 https://github.com/emqx/emqx/issues/10628