Fix the reverse match
This commit is contained in:
parent
1326e89593
commit
6f6e24592b
|
@ -190,8 +190,8 @@ parse(Topic = <<"$share/", Topic1/binary>>, Options) ->
|
||||||
[_] -> error({invalid_topic, Topic});
|
[_] -> error({invalid_topic, Topic});
|
||||||
[Group, Topic2] ->
|
[Group, Topic2] ->
|
||||||
case binary:match(Group, [<<"/">>, <<"+">>, <<"#">>]) of
|
case binary:match(Group, [<<"/">>, <<"+">>, <<"#">>]) of
|
||||||
nomatch -> error({invalid_topic, Topic});
|
nomatch -> {Topic2, maps:put(share, Group, Options)};
|
||||||
_ -> {Topic2, maps:put(share, Group, Options)}
|
_ -> error({invalid_topic, Topic})
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
parse(Topic, Options) ->
|
parse(Topic, Options) ->
|
||||||
|
|
Loading…
Reference in New Issue