Description of feature:
XEP-0045 specifies a disco#info and room configuration form field for the language mainly spoken in the room. Prosody should support both to allow owners to set a language and entities to query the language.
Motivation:
In room listings, it is good to be able to filter by language, if the information is provided by the room.
Zash
on
Sounds good. Should be easy. Does it specify what format the value should be in?
Not in the normative text. The example uses "en", and given that we’re in XML space, I suggest to enforce things which at least look like RFC 5646 (which obsoletes RFC 4646).
Zash
on
Neither MUC nor util.dataforms has much allowance for extended field validation, so I'll do it without format enforcement at first.
Description of feature: XEP-0045 specifies a disco#info and room configuration form field for the language mainly spoken in the room. Prosody should support both to allow owners to set a language and entities to query the language. Motivation: In room listings, it is good to be able to filter by language, if the information is provided by the room.
Sounds good. Should be easy. Does it specify what format the value should be in?
ChangesNot in the normative text. The example uses "en", and given that we’re in XML space, I suggest to enforce things which at least look like RFC 5646 (which obsoletes RFC 4646).
Neither MUC nor util.dataforms has much allowance for extended field validation, so I'll do it without format enforcement at first.
ChangesOk. FWIW, ejabberd validates this strictly to RFC 5646 ABNF (cf. <https://github.com/processone/xmpp/commit/69993339e490cde0f7243abf3f8963fec46a3e41>)
Done in https://hg.prosody.im/trunk/rev/9c90cd2fc4c3 And a small module for 0.10.x: https://modules.prosody.im/mod_muc_lang.html
Changes