Lua 5.4, Luarocks 3.12.2 and Prosody 0.12.5
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
default_storage = "sql"
|
||||
|
||||
sql = {
|
||||
driver = os.getenv("DB_DRIVER");
|
||||
database = os.getenv("DB_DATABASE");
|
||||
driver = os.getenv("DB_DRIVER") or "SQLite3";
|
||||
database = os.getenv("DB_DATABASE") or "prosody.sqlite";
|
||||
host = os.getenv("DB_HOST");
|
||||
port = os.getenv("DB_PORT");
|
||||
username = os.getenv("DB_USERNAME");
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
local stringy = require "stringy"
|
||||
local function _split(s, sep)
|
||||
if not s then return nil; end
|
||||
sep = sep or ",";
|
||||
local parts = {};
|
||||
for part in s:gmatch("[^"..sep.."]+") do
|
||||
parts[#parts+1] = part;
|
||||
end
|
||||
return parts;
|
||||
end
|
||||
|
||||
e2e_policy_chat = os.getenv("E2E_POLICY_CHAT")
|
||||
e2e_policy_muc = os.getenv("E2E_POLICY_MUC")
|
||||
e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST"), ", ")
|
||||
e2e_policy_whitelist = _split(os.getenv("E2E_POLICY_WHITELIST"), ", ")
|
||||
e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server."
|
||||
e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server."
|
||||
e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server."
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
local stringy = require "stringy"
|
||||
local function _split(s, sep)
|
||||
if not s then return nil; end
|
||||
sep = sep or ",";
|
||||
local parts = {};
|
||||
for part in s:gmatch("[^"..sep.."]+") do
|
||||
parts[#parts+1] = part;
|
||||
end
|
||||
return parts;
|
||||
end
|
||||
|
||||
local domain = os.getenv("DOMAIN")
|
||||
local abuse = os.getenv("SERVER_CONTACT_INFO_ABUSE") or "xmpp:abuse@" .. domain
|
||||
local admin = os.getenv("SERVER_CONTACT_INFO_ADMIN") or "xmpp:admin@" .. domain
|
||||
local feedback = os.getenv("SERVER_CONTACT_INFO_FEEDBACK") or "xmpp:feedback@" .. domain
|
||||
local sales = os.getenv("SERVER_CONTACT_INFO_SALES") or "xmpp:sales@" .. domain
|
||||
local security = os.getenv("SERVER_CONTACT_INFO_SECURITY") or "xmpp:security@" .. domain
|
||||
local support = os.getenv("SERVER_CONTACT_INFO_SUPPORT") or "xmpp:support@" .. domain
|
||||
|
||||
contact_info = {
|
||||
abuse = stringy.split(os.getenv("SERVER_CONTACT_INFO_ABUSE"), ", ");
|
||||
admin = stringy.split(os.getenv("SERVER_CONTACT_INFO_ADMIN"), ", ");
|
||||
feedback = stringy.split(os.getenv("SERVER_CONTACT_INFO_FEEDBACK"), ", ");
|
||||
sales = stringy.split(os.getenv("SERVER_CONTACT_INFO_SALES"), ", ");
|
||||
security = stringy.split(os.getenv("SERVER_CONTACT_INFO_SECURITY"), ", ");
|
||||
support = stringy.split(os.getenv("SERVER_CONTACT_INFO_SUPPORT"), ", ");
|
||||
abuse = _split(abuse, ", ");
|
||||
admin = _split(admin, ", ");
|
||||
feedback = _split(feedback, ", ");
|
||||
sales = _split(sales, ", ");
|
||||
security = _split(security, ", ");
|
||||
support = _split(support, ", ");
|
||||
}
|
||||
|
||||
welcome_message = "Kaixo $username, ongi etorri $host IM zerbitzura! Mesedez irakurri itzazu ondorengo <a href='https://lainoa.eus/terms/tos.html'>Erabilpen baldintzak</a>."
|
||||
|
||||
Reference in New Issue
Block a user