Mercurial > prosody-modules
changeset 6445:54e84ec12c82
mod_statistics: Replace util.serialization.serialize with %q
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Wed, 11 Mar 2026 00:42:57 +0100 |
| parents | 47d88f6e8400 |
| children | 63ce1af4d099 |
| files | mod_statistics/mod_statistics.lua |
| diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_statistics/mod_statistics.lua Wed Mar 11 00:42:49 2026 +0100 +++ b/mod_statistics/mod_statistics.lua Wed Mar 11 00:42:57 2026 +0100 @@ -2,15 +2,13 @@ local stats = module:require("mod_statistics/stats"); local filters = require "util.filters"; -local serialize = require "util.serialization".serialize; local cached_values = {}; local sessions = {}; local function push_stat(conn, name, value) - local value_str = serialize(value); - return conn:write((("STAT %q (%s)\n"):format(name, value_str):gsub("\\\n", "\\n"))); + return conn:write((("STAT %q (%q)\n"):format(name, value):gsub("\\\n", "\\n"))); end local function push_stat_to_all(name, value)
