From 4ca4a6af7d4efe1f8956d42cddcafe683e182d53 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 16 Aug 2024 18:39:46 +0200 Subject: 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. --- plugins/mod_s2s_bidi.lua | 6 +++--- 1 file 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; -- cgit v1.2.3