aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-08-16 18:39:46 +0200
committerKim Alvefur <zash@zash.se>2024-08-16 18:39:46 +0200
commit4ca4a6af7d4efe1f8956d42cddcafe683e182d53 (patch)
tree757e5cc71422b78b09c0d304c231b1669bec2057
parent9327c4342ac695754dd46c594dccd9518a5a38d3 (diff)
downloadprosody-4ca4a6af7d4efe1f8956d42cddcafe683e182d53.tar.gz
prosody-4ca4a6af7d4efe1f8956d42cddcafe683e182d53.zip
mod_s2s_bidi: Include empty list of labels in metrics
Throws error attempting to append the nil label list to an array for host-scoped metrics.
-rw-r--r--plugins/mod_s2s_bidi.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_s2s_bidi.lua b/plugins/mod_s2s_bidi.lua
index 3ef7aa3b..8588ce59 100644
--- a/plugins/mod_s2s_bidi.lua
+++ b/plugins/mod_s2s_bidi.lua
@@ -12,9 +12,9 @@ local xmlns_bidi = "urn:xmpp:bidi";
local require_encryption = module:get_option_boolean("s2s_require_encryption", true);
-local offers_sent = module:metric("counter", "offers_sent", "", "Bidirectional connection offers sent");
-local offers_recv = module:metric("counter", "offers_recv", "", "Bidirectional connection offers received");
-local offers_taken = module:metric("counter", "offers_taken", "", "Bidirectional connection offers taken");
+local offers_sent = module:metric("counter", "offers_sent", "", "Bidirectional connection offers sent", {});
+local offers_recv = module:metric("counter", "offers_recv", "", "Bidirectional connection offers received", {});
+local offers_taken = module:metric("counter", "offers_taken", "", "Bidirectional connection offers taken", {});
module:hook("s2s-stream-features", function(event)
local origin, features = event.origin, event.features;