strophejs icon indicating copy to clipboard operation
strophejs copied to clipboard

Request to Implement XEP-0156: Discovering Alternative XMPP Connection Methods

Open jinyu2022 opened this issue 1 year ago • 2 comments

I would like to request the implementation of XEP-0156, which specifies a method for discovering alternative XMPP connection methods through the use of the host-meta file. This feature would greatly enhance the flexibility and usability of XMPP clients by allowing them to automatically discover available connection methods.

To implement this feature, we can use the following approach:

fetch(`https://${domain}/.well-known/host-meta`)
      .then((res) => res.text())
.......

Implementing this feature will:

  • Improve the user experience by allowing automatic discovery of connection methods.
  • Enhance interoperability with various XMPP servers that support alternative connection methods.
  • Reduce the need for manual configuration by users.

jinyu2022 avatar Nov 30 '24 08:11 jinyu2022

Currently, the plugin can achieve this functionality, but Strophe.Connection explicitly requires the service parameter to be a string. Even with the XEP-0156 plugin loaded, the IDE still mandates that this parameter be passed in as a string. We need better IDE type assertion support to allow for more flexibility in handling parameter types when using this plugin, rather than enforcing a strict requirement for a string. Please help. Please let me know what I should do.

jinyu2022 avatar Nov 30 '24 09:11 jinyu2022

What other type besides string do you want to pass in? I think this issue is out of scope for Strophe.js core.

Where is the XEP-0156 plugin?

jcbrand avatar Feb 19 '25 06:02 jcbrand