More frequent message cleanup
This commit is contained in:
@@ -14,6 +14,7 @@ export type ConfigKeyType =
|
||||
| 'desktop.groupCalling'
|
||||
| 'desktop.gv2'
|
||||
| 'desktop.internalUser'
|
||||
| 'desktop.messageCleanup'
|
||||
| 'desktop.mandatoryProfileSharing'
|
||||
| 'desktop.mediaQuality.levels'
|
||||
| 'desktop.messageRequests'
|
||||
|
@@ -6,6 +6,7 @@ import * as durations from './durations';
|
||||
import { map, filter } from './iterables';
|
||||
import { isNotNil } from './isNotNil';
|
||||
import type { MessageAttributesType } from '../model-types.d';
|
||||
import { isEnabled } from '../RemoteConfig';
|
||||
|
||||
const FIVE_MINUTES = 5 * durations.MINUTE;
|
||||
|
||||
@@ -125,6 +126,9 @@ export class MessageController {
|
||||
}
|
||||
|
||||
startCleanupInterval(): NodeJS.Timeout | number {
|
||||
return setInterval(this.cleanup.bind(this), durations.HOUR);
|
||||
return setInterval(
|
||||
this.cleanup.bind(this),
|
||||
isEnabled('desktop.messageCleanup') ? FIVE_MINUTES : durations.HOUR
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user