fix(sys_topic): format shared topics

This commit is contained in:
JimMoen 2024-04-09 16:53:20 +08:00
parent 47e0f3bb1f
commit 03a9c46ca7
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@
-include("types.hrl"). -include("types.hrl").
-include("logger.hrl"). -include("logger.hrl").
-include("emqx_hooks.hrl"). -include("emqx_hooks.hrl").
-include("emqx_mqtt.hrl").
-export([ -export([
start_link/0, start_link/0,
@ -279,7 +280,7 @@ on_client_subscribed(
clientid => ClientId, clientid => ClientId,
username => Username, username => Username,
protocol => Protocol, protocol => Protocol,
topic => Topic, topic => emqx_topic:maybe_format_share(Topic),
subopts => SubOpts, subopts => SubOpts,
ts => erlang:system_time(millisecond) ts => erlang:system_time(millisecond)
}, },
@ -298,7 +299,7 @@ on_client_unsubscribed(
clientid => ClientId, clientid => ClientId,
username => Username, username => Username,
protocol => Protocol, protocol => Protocol,
topic => Topic, topic => emqx_topic:maybe_format_share(Topic),
ts => erlang:system_time(millisecond) ts => erlang:system_time(millisecond)
}, },
publish(unsubscribed, Payload). publish(unsubscribed, Payload).