Changeset

8868:b9e56f46916e

MUC: Use xml:lang from stanza that creates a room as default for language
author Kim Alvefur <zash@zash.se>
date Sun, 03 Jun 2018 14:43:15 +0200
parents 8867:c601c834bf01
children 8869:7277797a4988
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Sun Jun 03 14:43:06 2018 +0200
+++ b/plugins/muc/mod_muc.lua	Sun Jun 03 14:43:15 2018 +0200
@@ -292,7 +292,7 @@
 	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)