Skip to content

Commit

Permalink
Merge pull request #99 from esl/client-state-indication
Browse files Browse the repository at this point in the history
read csi feature from stream features
  • Loading branch information
studzien committed Mar 31, 2016
2 parents 58f8c8a + 24ddc03 commit 9ee2b4c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/escalus_session.erl
Expand Up @@ -307,7 +307,8 @@ get_stream_features(Features) ->
[{compression, get_compression(Features)},
{starttls, get_starttls(Features)},
{stream_management, get_stream_management(Features)},
{advanced_message_processing, get_advanced_message_processing(Features)}]
{advanced_message_processing, get_advanced_message_processing(Features)},
{client_state_indication, get_client_state_indication(Features)}]
++ get_sasl_mechanisms(Features).

-spec get_compression(exml:element()) -> boolean().
Expand All @@ -330,6 +331,11 @@ get_stream_management(Features) ->
get_advanced_message_processing(Features) ->
undefined =/= exml_query:subelement(Features, <<"amp">>).


-spec get_client_state_indication(exml:element()) -> boolean().
get_client_state_indication(Features) ->
undefined =/= exml_query:subelement(Features, <<"csi">>).

-spec get_sasl_mechanisms(exml:element()) -> features().
get_sasl_mechanisms(Features) ->
MechCDataPath = [{element, <<"mechanisms">>}, {element, <<"mechanism">>}, cdata],
Expand Down

0 comments on commit 9ee2b4c

Please sign in to comment.