Changeset

11849:7440d610e5f1

ejabberd2prosody: Don't import disabled or empty passwords
author Matthew Wild <mwild1@gmail.com>
date Wed, 13 Oct 2021 10:04:11 +0100
parents 11848:b4d4f0339e16
children 11850:bfa85965106e
files tools/ejabberd2prosody.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ejabberd2prosody.lua	Tue Oct 12 17:55:53 2021 +0200
+++ b/tools/ejabberd2prosody.lua	Wed Oct 13 10:04:11 2021 +0100
@@ -193,7 +193,9 @@
 	end
 	store._data.name = properties.title;
 	store._data.description = properties.description;
-	store._data.password = properties.password;
+	if properties.password_protected ~= false and properties.password ~= "" then
+		store._data.password = properties.password;
+	end
 	store._data.moderated = (properties.moderated == "true") or nil;
 	store._data.members_only = (properties.members_only == "true") or nil;
 	store._data.persistent = (properties.persistent == "true") or nil;