Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat: Adds conference duration to the amplitude stat. (#13294)

Дамян Минков2b71fa512bbb
diff --git a/resources/prosody-plugins/mod_measure_message_count.lua b/resources/prosody-plugins/mod_measure_message_count.lua
index 2f61cc2a31..3156d7f40f 100644
--- a/resources/prosody-plugins/mod_measure_message_count.lua
+++ b/resources/prosody-plugins/mod_measure_message_count.lua
@@ -64,6 +64,10 @@ function send_event(room)
polls_count = room._muc_polls_count or 0;
};
+ if room.created_timestamp then
+ event_properties.duration = (os.time() * 1000 - room.created_timestamp) / 1000;
+ end
+
local event = {
api_key = amplitude_api_key;
events = {