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

specs: mix: Always use mix:core:1 xmlns for mix_participant #84

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

Conversation

lnjX
Copy link
Contributor

@lnjX lnjX commented Aug 19, 2024

The items from the participants node must have one specific namespace
and we cannot support both versions at the same time. The current
behaviour is to use the old mix:core:0 namespace (by default). This
changes the behaviour to always use the new mix:core:1 namespace.

@prefiks
Copy link
Member

prefiks commented Aug 20, 2024

Hello, could you tell me what look your code that has problem with distingishing between those two? is that a problem with parsing xml data, or using records from that directly. I think both those cases should work as long as xmlns field is set to correct namespace.

@lnjX
Copy link
Contributor Author

lnjX commented Aug 20, 2024

Hi @prefiks, my issue is that ejabberd still outputs pubsub items with the old namespace. The code in ejabberd just doesn't set the xmlns attribute of the record (so it defaults to the first (old) namespace here). I thought that we can maybe just drop the old version to keep things simple. This way ejabberd will automatically use the new namespace without any further changes.

However I can also understand if you want to keep the parsing code of the old version. In that case we would need to set the xmlns explicitly in ejabberd everywhere to comply with the current MIX version.

@weiss
Copy link
Member

weiss commented Sep 9, 2024

I'm not aware of a public client that supports the old revision, so maybe we could just ditch mix:core:0 support indeed? (Or are there closed solutions using it?)

Would of course just delay the problem until we arrive at mix:core:2 …

@lnjX
Copy link
Contributor Author

lnjX commented Sep 9, 2024

I just noticed that the new mix:core:1 version actually differs from the mix:core:0 version:

<participant xmlns='urn:xmpp:mix:core:0' nick='thirdwitch'/>

vs.

<participant xmlns='urn:xmpp:mix:core:1'>
  <nick>thirdwitch</nick>
  <jid>[email protected]</jid>
</participant>

So the current version of mix_participant would generate wrong XML output with the new xmlns set.

If you want, I can adjust the PR and change that. :)


Would of course just delay the problem until we arrive at mix:core:2 …

I'd personally expect / hope for a migration path specified by the XEP in that case, e.g. a new participants node name for the new version.
Otherwise it's not possible to support multiple versions at the same time.

The mix_participant record is only used for the participants node of a
mix channel. This node cannot contain both namespaces at the same time,
thus this commit drops the old version and it also fixes the definition
of the element in mix:core:1. The attributes have been replaced with xml
elements for nick and jid.
@lnjX
Copy link
Contributor Author

lnjX commented Oct 26, 2024

I fixed the definition of the element so that it uses XML subelements for nick and jid now (as specified in the new MIX version).

The old version is dropped since ejabberd cannot support both versions at the same time anyway. If you prefer to still have the old version in the xmpp lib, I could create two different records for both versions. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants