Don't set from/to attributes in resource binding iq
This commit is contained in:
parent
86236431b9
commit
bce8922e5d
|
@ -739,15 +739,13 @@ process_sasl_failure(Reason, State) ->
|
||||||
|
|
||||||
-spec process_bind(stream_features(), state()) -> state().
|
-spec process_bind(stream_features(), state()) -> state().
|
||||||
process_bind(StreamFeatures, #{lang := Lang, xmlns := ?NS_CLIENT,
|
process_bind(StreamFeatures, #{lang := Lang, xmlns := ?NS_CLIENT,
|
||||||
user := U, server := S, resource := R,
|
resource := R,
|
||||||
stream_state := StateName} = State)
|
stream_state := StateName} = State)
|
||||||
when StateName /= established, StateName /= disconnected ->
|
when StateName /= established, StateName /= disconnected ->
|
||||||
case xmpp:has_subtag(StreamFeatures, #bind{}) of
|
case xmpp:has_subtag(StreamFeatures, #bind{}) of
|
||||||
true ->
|
true ->
|
||||||
JID = jid:make(U, S, R),
|
|
||||||
ID = new_id(),
|
ID = new_id(),
|
||||||
Pkt = #iq{from = JID, to = jid:remove_resource(JID),
|
Pkt = #iq{id = ID, type = set,
|
||||||
id = ID, type = set,
|
|
||||||
sub_els = [#bind{resource = R}]},
|
sub_els = [#bind{resource = R}]},
|
||||||
State1 = State#{stream_state => wait_for_bind_response,
|
State1 = State#{stream_state => wait_for_bind_response,
|
||||||
bind_id => ID},
|
bind_id => ID},
|
||||||
|
|
Loading…
Reference in New Issue