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