Software /
code /
prosody
Comparison
plugins/muc/language.lib.lua @ 10063:13ccc2f05007
MUC: Advertise language field as such via XEP-0122
This lets clients know that the field is a language field and should be
in RFC 5646 format.
Field validation code in util.dataforms left for future commit.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 07 Jul 2019 19:15:35 +0200 |
parent | 9035:173c0e16e704 |
comparison
equal
deleted
inserted
replaced
10062:6ffed67356e9 | 10063:13ccc2f05007 |
---|---|
30 table.insert(event.form, { | 30 table.insert(event.form, { |
31 name = "muc#roomconfig_lang"; | 31 name = "muc#roomconfig_lang"; |
32 label = "Language tag for room (e.g. 'en', 'de', 'fr' etc.)"; | 32 label = "Language tag for room (e.g. 'en', 'de', 'fr' etc.)"; |
33 type = "text-single"; | 33 type = "text-single"; |
34 desc = "Indicate the primary language spoken in this room"; | 34 desc = "Indicate the primary language spoken in this room"; |
35 datatype = "xs:language"; | |
35 value = get_language(event.room) or ""; | 36 value = get_language(event.room) or ""; |
36 }); | 37 }); |
37 end | 38 end |
38 | 39 |
39 module:hook("muc-disco#info", add_disco_form); | 40 module:hook("muc-disco#info", add_disco_form); |