fix: deprecated `share` in `subopts`
This commit is contained in:
parent
b5411da770
commit
0ca725ff25
|
@ -214,7 +214,6 @@
|
|||
rap := 0 | 1,
|
||||
nl := 0 | 1,
|
||||
qos := qos(),
|
||||
share => binary(),
|
||||
atom() => term()
|
||||
}.
|
||||
-type reason_code() :: 0..16#FF.
|
||||
|
|
|
@ -460,8 +460,11 @@ message SubOpts {
|
|||
// The QoS level
|
||||
uint32 qos = 1;
|
||||
|
||||
// deprecated
|
||||
reserved 2;
|
||||
reserved "share";
|
||||
// The group name for shared subscription
|
||||
string share = 2;
|
||||
// string share = 2;
|
||||
|
||||
// The Retain Handling option (MQTT v5.0)
|
||||
//
|
||||
|
|
|
@ -192,7 +192,7 @@ on_session_subscribed(ClientInfo, Topic, SubOpts) ->
|
|||
Req = #{
|
||||
clientinfo => clientinfo(ClientInfo),
|
||||
topic => emqx_topic:maybe_format_share(Topic),
|
||||
subopts => maps:with([qos, share, rh, rap, nl], SubOpts)
|
||||
subopts => maps:with([qos, rh, rap, nl], SubOpts)
|
||||
},
|
||||
cast('session.subscribed', Req).
|
||||
|
||||
|
|
|
@ -546,9 +546,7 @@ subopts(SubOpts) ->
|
|||
qos => maps:get(qos, SubOpts, 0),
|
||||
rh => maps:get(rh, SubOpts, 0),
|
||||
rap => maps:get(rap, SubOpts, 0),
|
||||
nl => maps:get(nl, SubOpts, 0),
|
||||
%% TOOD: FIXME for share-sub refactored
|
||||
share => maps:get(share, SubOpts, <<>>)
|
||||
nl => maps:get(nl, SubOpts, 0)
|
||||
}.
|
||||
|
||||
authresult_to_bool(AuthResult) ->
|
||||
|
|
Loading…
Reference in New Issue