aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-03 14:43:15 +0200
committerKim Alvefur <zash@zash.se>2018-06-03 14:43:15 +0200
commit9e955eb3c37212d403a9a6e97fcb91f30fc9b6b1 (patch)
tree23b49009625b50ede2f228185a21bd683d30d15a /plugins/muc/mod_muc.lua
parentfb25b898948eb0e6d3ed392324a89b3abcc102c7 (diff)
downloadprosody-9e955eb3c37212d403a9a6e97fcb91f30fc9b6b1.tar.gz
prosody-9e955eb3c37212d403a9a6e97fcb91f30fc9b6b1.zip
MUC: Use xml:lang from stanza that creates a room as default for language
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r--plugins/muc/mod_muc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 7be8c2d3..675bd9d5 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -292,7 +292,7 @@ module:hook("muc-room-pre-create", function (event)
room:set_whois(module:get_option_boolean("muc_rooom_default_public_jids", room:get_whois() == "anyone") and "anyone" or "moderators");
room:set_changesubject(module:get_option_boolean("muc_rooom_default_change_subject", room:get_changesubject()));
room:set_historylength(module:get_option_number("muc_room_default_history_length", room:get_historylength()));
- room:set_language(module:get_option_string("muc_room_default_language"));
+ room:set_language(event.stanza.attr["xml:lang"] or module:get_option_string("muc_room_default_language"));
end, 1);
module:hook("muc-room-pre-create", function(event)