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});
|
||||
[Group, Topic2] ->
|
||||
case binary:match(Group, [<<"/">>, <<"+">>, <<"#">>]) of
|
||||
nomatch -> error({invalid_topic, Topic});
|
||||
_ -> {Topic2, maps:put(share, Group, Options)}
|
||||
nomatch -> {Topic2, maps:put(share, Group, Options)};
|
||||
_ -> error({invalid_topic, Topic})
|
||||
end
|
||||
end;
|
||||
parse(Topic, Options) ->
|
||||
|
|
Loading…
Reference in New Issue