Browse Source

Improve algorithm (#2676)

pull/2684/head
Thomas Kaul 1 year ago
committed by GitHub
parent
commit
5ad248a643
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      apps/api/src/app/user/user.service.ts

10
apps/api/src/app/user/user.service.ts

@ -198,16 +198,18 @@ export class UserService {
new Date(),
user.createdAt
);
let frequency = 20;
let frequency = 15;
if (daysSinceRegistration > 180) {
if (daysSinceRegistration > 365) {
frequency = 2;
} else if (daysSinceRegistration > 180) {
frequency = 3;
} else if (daysSinceRegistration > 60) {
frequency = 5;
} else if (daysSinceRegistration > 30) {
frequency = 10;
frequency = 8;
} else if (daysSinceRegistration > 15) {
frequency = 15;
frequency = 12;
}
if (Analytics?.activityCount % frequency === 1) {

Loading…
Cancel
Save