Comparison

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
comparison
equal deleted inserted replaced
11848:b4d4f0339e16 11849:7440d610e5f1
191 if properties.subject_author then 191 if properties.subject_author then
192 store._data.subject_from = store.jid .. "/" .. properties.subject_author; 192 store._data.subject_from = store.jid .. "/" .. properties.subject_author;
193 end 193 end
194 store._data.name = properties.title; 194 store._data.name = properties.title;
195 store._data.description = properties.description; 195 store._data.description = properties.description;
196 store._data.password = properties.password; 196 if properties.password_protected ~= false and properties.password ~= "" then
197 store._data.password = properties.password;
198 end
197 store._data.moderated = (properties.moderated == "true") or nil; 199 store._data.moderated = (properties.moderated == "true") or nil;
198 store._data.members_only = (properties.members_only == "true") or nil; 200 store._data.members_only = (properties.members_only == "true") or nil;
199 store._data.persistent = (properties.persistent == "true") or nil; 201 store._data.persistent = (properties.persistent == "true") or nil;
200 store._data.changesubject = (properties.allow_change_subj == "true") or nil; 202 store._data.changesubject = (properties.allow_change_subj == "true") or nil;
201 store._data.whois = properties.anonymous == "true" and "moderators" or "anyone"; 203 store._data.whois = properties.anonymous == "true" and "moderators" or "anyone";