view mod_service_outage_status/mod_service_outage_status.lua @ 5804:c3eeeb968403

mod_pubsub_serverinfo: Detect existence of pub/sub node Instead of blindly trying to create the pub/sub node to publish items to, a service discovery query is performed to check if node creation is required. Added various bits of warn and debug logging, to give a user better feedback if and why something is failing.
author Guus der Kinderen <guus.der.kinderen@gmail.com>
date Thu, 04 Jan 2024 11:59:35 +0100
parents 03044a6f5f4c
children
line wrap: on
line source

local dataforms = require "util.dataforms";

local form_layout = dataforms.new({
	{ type = "hidden"; var = "FORM_TYPE"; value = "urn:xmpp:sos:0" };
	{ type = "list-multi"; name = "addrs"; var = "external-status-addresses" };
});

local addresses = module:get_option_array("outage_status_urls");
module:add_extension(form_layout:form({ addrs = addresses }, "result"));