diff --git a/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl b/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl --- a/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl +++ b/apps/kolab_guam/src/rules/kolab_guam_rule_filter_groupware.erl @@ -30,21 +30,21 @@ apply_to_client_message(ImapSession, Buffer, State) -> { Tag, Command, Data } = eimap_utils:split_command_into_components(Buffer), - { Active, StateTag }= - if Command =:= <<"LIST">>; - Command =:= <<"list">>; - Command =:= <<"XLIST">>; - Command =:= <<"xlist">>; - Command =:= <<"LSUB">>; - Command =:= <<"lsub">> -> - case binary:match(Data, <<"*">>) of - nomatch -> { false, <<>> }; - _ -> - fetch_metadata(ImapSession, State), - { true, Tag } - end; - true -> { false, <<>> } - end, + { Active, StateTag } = + if Command =:= <<"LIST">>; + Command =:= <<"list">>; + Command =:= <<"XLIST">>; + Command =:= <<"xlist">>; + Command =:= <<"LSUB">>; + Command =:= <<"lsub">> -> + case {binary:match(Data, <<"*">>),binary:match(Data, <<"%">>)} of + nomatch -> { false, <<>> }; + _ -> + fetch_metadata(ImapSession, State), + { true, Tag } + end; + true -> { false, <<>> } + end, %lager:info("Client sent: ~s ~s ~p", [Command, Data, Active]), { Buffer, State#state{ active = Active, tag = StateTag }}.