Diff

tools/ejabberd2prosody.lua @ 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
parent 11842:c20ff585e966
child 11871:5dcbba569fb9
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;