Skip to content

Commit 5e18e35

Browse files
author
Wyndolin Crook
committed
fixed percentage rounding and raised short report attendee cap back to 30
1 parent c8596f7 commit 5e18e35

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

assets/temp/attendees.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Thu Nov 06 2025 20:19:01 GMT-0700 (Mountain Standard Time);213812474670088202;sH3llH0und;true
1+
Tue Nov 18 2025 16:01:01 GMT-0700 (Mountain Standard Time);213812474670088202;sH3llH0und;true
2+
Tue Nov 18 2025 16:02:15 GMT-0700 (Mountain Standard Time);213812474670088202;sH3llH0und;false

src/features/logging/scheduledEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async function logContainer(event: IScheduledEvent) {
109109
//todo: figure out how to generate text file
110110
//todo: add some file output for attachments in this function; wire it up to the main log function
111111
const attendeesStr =
112-
attendees.length > 0 && attendees.length < 15
112+
attendees.length > 0 && attendees.length < 30
113113
? attendees
114114
.map((usr) => {
115115
return `\n- ${usr}`;

src/util/scheduledEventWrapper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ export class ScheduledEventWrapper {
289289
pair.leave = this.event.endedAt;
290290
}
291291

292-
const pairDuration = Math.round(pair.leave.getTime() - pair.join.getTime());
292+
const pairDuration = pair.leave.getTime() - pair.join.getTime();
293293

294294
attendanceTotals.set(
295295
pair.id,
296-
attendanceTotals.get(pair.id) ?? 0 + pairDuration,
296+
(attendanceTotals.get(pair.id) ?? 0) + pairDuration,
297297
);
298298
});
299299

@@ -312,7 +312,7 @@ export class ScheduledEventWrapper {
312312
if (!totals) throw Error("Failed to calculate attendance totals");
313313

314314
totals.forEach((value: number, key: string) => {
315-
percentages.set(key, (value / eventDuration) * 100);
315+
percentages.set(key, Math.round((value / eventDuration) * 100));
316316
});
317317

318318
return percentages;

0 commit comments

Comments
 (0)