aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-04-06 16:51:27 +0200
committerKim Alvefur <zash@zash.se>2024-04-06 16:51:27 +0200
commitb438a292e95ffc5185a17ef345628b890564b2b8 (patch)
tree5e79e516a4494abda758783b64137f4878033866
parent0987a0113d46e4b7ec102db4e5eac2796ff44f64 (diff)
downloadprosody-b438a292e95ffc5185a17ef345628b890564b2b8.tar.gz
prosody-b438a292e95ffc5185a17ef345628b890564b2b8.zip
mod_server_contact_info: Sort form fields to please scansion
The unstable hash table order caused the tests to fail and I don't know how to tell scansion to ignore the order.
-rw-r--r--plugins/mod_server_contact_info.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_server_contact_info.lua b/plugins/mod_server_contact_info.lua
index 927f4c22..67fed752 100644
--- a/plugins/mod_server_contact_info.lua
+++ b/plugins/mod_server_contact_info.lua
@@ -7,6 +7,7 @@
--
local array = require "prosody.util.array";
+local it = require "prosody.util.iterators";
local jid = require "prosody.util.jid";
local url = require "socket.url";
@@ -32,7 +33,7 @@ local contact_config = module:get_option("contact_info", {
local fields = {};
-for key, field_var in pairs(address_types) do
+for key, field_var in it.sorted_pairs(address_types) do
if contact_config[key] then
table.insert(fields, {
type = "list-multi";