mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 15:17:44 -06:00
fix: Adjustment in the recording of temporary files and periodic cleaning
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ConfigService } from '../../config/env.config';
|
||||
import { ConfigService, StoreConf } from '../../config/env.config';
|
||||
import { join } from 'path';
|
||||
import { IMessageModel, MessageRaw } from '../models';
|
||||
import { IInsert, Repository } from '../abstract/abstract.repository';
|
||||
@@ -47,7 +47,9 @@ export class MessageRepository extends Repository {
|
||||
return { insertCount: insert.length };
|
||||
}
|
||||
|
||||
if (saveDb) {
|
||||
const store = this.configService.get<StoreConf>('STORE');
|
||||
|
||||
if (store.MESSAGES) {
|
||||
data.forEach((msg) =>
|
||||
this.writeStore<MessageRaw>({
|
||||
path: join(this.storePath, 'messages', msg.owner),
|
||||
|
||||
Reference in New Issue
Block a user