Trying to get the activity logs to work... Create!
This commit is contained in:
@@ -156,6 +156,11 @@ export async function create_ae_obj__activity_log({
|
||||
}) {
|
||||
console.log(`*** create_ae_obj__activity_log() *** account_id=${account_id}`);
|
||||
|
||||
if (!account_id) {
|
||||
console.log(`ERROR: Journals - Journal - account_id required to create`);
|
||||
return false;
|
||||
}
|
||||
|
||||
ae_promises.create__activity_log = await api
|
||||
.create_ae_obj_crud({
|
||||
api_cfg: api_cfg,
|
||||
|
||||
@@ -55,12 +55,18 @@
|
||||
|
||||
console.log('Jitsi: Preparing to report meeting stats...');
|
||||
const participants_array = Array.from(meeting_participants.values());
|
||||
console.log('Jitsi: DONE! Compiled participants array for stats report:', participants_array);
|
||||
|
||||
const data_kv = {
|
||||
source: 'idaa_jitsi_meeting',
|
||||
activity: 'live_stats_update',
|
||||
name: room_name,
|
||||
data_json: {
|
||||
external_client_id: user_id, // Novi Customer GUID in this case
|
||||
name: 'live_stats_update', // Name of log entry "type"
|
||||
description: room_name,
|
||||
url_root: data?.url.origin,
|
||||
url_full_path: data?.url.pathname,
|
||||
url_params: data?.url.searchParams.toString(),
|
||||
action: 'jitsi_live_stats_report',
|
||||
action_with: 'timer_loop',
|
||||
meta_json: {
|
||||
duration: meeting_duration,
|
||||
participants: participants_array,
|
||||
participant_count: participants_array.length
|
||||
@@ -70,12 +76,17 @@
|
||||
console.log('Jitsi: Stats payload being sent:', JSON.stringify(data_kv, null, 2));
|
||||
|
||||
try {
|
||||
console.log('Jitsi: HERE! Calling create_ae_obj__activity_log API... Lost contact....');
|
||||
const result = await create_ae_obj__activity_log({
|
||||
api_cfg: $ae_loc.auth.api_cfg,
|
||||
account_id: $ae_loc.auth.account.account_id_random,
|
||||
data_kv: data_kv
|
||||
});
|
||||
console.log('Jitsi: Activity log API call successful.', result);
|
||||
data_kv: data_kv,
|
||||
log_lvl: 2,
|
||||
})
|
||||
// .catch((err) => {
|
||||
// console.error('Jitsi: Error in create_ae_obj__activity_log API call:', err);
|
||||
// });
|
||||
console.log('Jitsi: NOT SEEING THIS! Activity log API call successful.', result);
|
||||
} catch (error) {
|
||||
console.error('Jitsi: Error calling create_ae_obj__activity_log:', error);
|
||||
}
|
||||
@@ -127,7 +138,7 @@
|
||||
if (is_moderator) {
|
||||
console.log('Jitsi: User is a moderator. Starting stats reporting timer...');
|
||||
if (reporting_timer_id) clearInterval(reporting_timer_id);
|
||||
reporting_timer_id = setInterval(report_meeting_stats, 30000); // Report every 30 seconds
|
||||
reporting_timer_id = setInterval(report_meeting_stats, 17000); // Report every 30 seconds
|
||||
} else {
|
||||
console.log('Jitsi: User is not a moderator. Stats reporting will not start.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user