You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flow is like this: when clicking "add a new contact" we check to see if there are any gateways in the user's roster (by checking category == gateyway or features contains jabber:iq:gateway in caps). If there are none, the we just show exactly the dialog Movim has today, and everything works as normal.
If any gateways are found in the roster, then we add a drop-down to the top of the dialog. This drop down will default to "Enter the JID for your contact" and the rest of the form works as normal. We send off
<iq type='result' from='example.gateway' to='user@movim.eu/movim id='1'>
<query xmlns='jabber:iq:gateway'>
<desc>
Please enter the gateway username you want to contact
</desc>
<prompt>Gateway Username</prompt>
</query>
</iq>
Or else an error iq indicating that the gateway just uses basic jid escaping and not the full protocol.
When the user picks a gateway from the dropdown, we can show a field that is labelled with the label text we got from the protocol above, so that the user knows what kind/format of username they should enter. (In the case of an error response above, a generic "contact id: " or similar prompt is used)
Or an error response. With the above response, we are done and add the given JID to the roster as though it had been entered manually by the user. With an error response, we show the error on the form to let the user know they have entered an invalid contact identifier and what the error is so they can try again.
If a gateway does not support the protocol (detected by error response in the first step, noted above) then we do not try to use it in this step, and instead use JIDescape(<entered-text>)@gateway.example as the JID to add to the roster.
The text was updated successfully, but these errors were encountered:
Closing this ticket as nothing has been done since then :)
I made some improvements regarding gateway handling but not that feature especially.
If you have something to propose, please mention this ticket in your PR and we'll see if we can reopen it.
This is #367 again because #378 had some bugs and was reverted.
The main goal is to implement UI for https://xmpp.org/extensions/xep-0100.html#addressing and especially for 6.3
jabber:iq:gateway
The flow is like this: when clicking "add a new contact" we check to see if there are any gateways in the user's roster (by checking category == gateyway or features contains jabber:iq:gateway in caps). If there are none, the we just show exactly the dialog Movim has today, and everything works as normal.
If any gateways are found in the roster, then we add a drop-down to the top of the dialog. This drop down will default to "Enter the JID for your contact" and the rest of the form works as normal. We send off
to each gateway and get back
Or else an error iq indicating that the gateway just uses basic jid escaping and not the full protocol.
When the user picks a gateway from the dropdown, we can show a field that is labelled with the label text we got from the protocol above, so that the user knows what kind/format of username they should enter. (In the case of an error response above, a generic "contact id: " or similar prompt is used)
When the form is submitted, we then send off:
and get back:
Or an error response. With the above response, we are done and add the given JID to the roster as though it had been entered manually by the user. With an error response, we show the error on the form to let the user know they have entered an invalid contact identifier and what the error is so they can try again.
If a gateway does not support the protocol (detected by error response in the first step, noted above) then we do not try to use it in this step, and instead use
JIDescape(<entered-text>)@gateway.example
as the JID to add to the roster.The text was updated successfully, but these errors were encountered: