Add support for sending stats to Matrix, split out some code into more generic classes. #1

Open
rory.gay wants to merge 35 commits from rory.gay/freepbx-stats:main into main
Showing only changes of commit 5aa8144ad5 - Show all commits

View file

@ -104,6 +104,7 @@ function updateRecords(callStats, records) {
records.totalCallsEverPlaced = callStats.totalCallsEverPlaced;
// Update monthly totals
if (!records.monthlyTotals) records.monthlyTotals = {};
records.monthlyTotals[yesterday.getFullYear().toString()][yesterday.getMonth().toString()] = callStats.totalCallsThisMonth;
if (isNewRecord) {