Merge branch 'dev' into modules-proxy-patches

This commit is contained in:
Nuckyz 2024-05-26 21:17:02 -03:00
commit 6d59a943da
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -87,6 +87,7 @@ export default definePlugin({
async start() { async start() {
await DataStore.update("summaries-data", summaries => { await DataStore.update("summaries-data", summaries => {
summaries ??= {};
for (const key of Object.keys(summaries)) { for (const key of Object.keys(summaries)) {
for (let i = summaries[key].length - 1; i >= 0; i--) { for (let i = summaries[key].length - 1; i >= 0; i--) {
if (summaries[key][i].time < Date.now() - 1000 * 60 * 60 * 24 * settings.store.summaryExpiryThresholdDays) { if (summaries[key][i].time < Date.now() - 1000 * 60 * 60 * 24 * settings.store.summaryExpiryThresholdDays) {