Mercurial > prosody-modules
comparison mod_nodeinfo2/mod_nodeinfo2.lua @ 3781:263f5f1ee71f
mod_nodeinfo2: Store a table instead of an integer (workaround for #905)
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 29 Dec 2019 19:53:23 +0100 |
parents | 7f5ce667d93e |
children | 908b5fd47634 |
comparison
equal
deleted
inserted
replaced
3780:824447fc7759 | 3781:263f5f1ee71f |
---|---|
46 GET = function (event) | 46 GET = function (event) |
47 local stats, changed_only, extras = get_stats(); | 47 local stats, changed_only, extras = get_stats(); |
48 for stat, _ in pairs(stats) do | 48 for stat, _ in pairs(stats) do |
49 if stat == "/*/mod_measure_message_e2ee/message:rate" then | 49 if stat == "/*/mod_measure_message_e2ee/message:rate" then |
50 local new_message_count = extras[stat].total; | 50 local new_message_count = extras[stat].total; |
51 if new_message_count ~= message_count then | 51 if new_message_count ~= message_count[1] then |
52 message_count = new_message_count; | 52 message_count = { new_message_count }; |
53 message_count_store:set("message_count", message_count); | 53 message_count_store:set("message_count", message_count); |
54 end | 54 end |
55 end | 55 end |
56 end | 56 end |
57 | 57 |