Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bind 2.0 #137

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Implement bind 2.0 #137

wants to merge 7 commits into from

Conversation

michalwski
Copy link
Contributor

Proposed changes include:

  • implementation of bind 2.0 as described in this proto XEP
  • removal of escalus_session:bind/2 - it is not needed
  • escalus_session:bind/3 returns client data with jid set based on the result of bind query

JID = exml_query:path(BindReply, [{element, <<"bind">>}, {element, <<"jid">>}, cdata]),
Conn2 = Conn#client{jid = JID},

PropsWithResource =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Elvis:

Line 249 has a tab at column 0.

bind/2 is not needed so the implementatino was moved to bind/3
Additionaly bind/3 returns client data with jid set based on
the result of bind query
the previous recive was too strict, it was pattern maching on whole
connection object which may be different for the process holding the
connection and the one using it. F.e one has field jid set correctly,
the other doesn't
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants