Convert message cleanup services to TypeScript

This commit is contained in:
Evan Hahn 2022-05-31 23:53:14 +00:00 committed by GitHub
parent 16d180efac
commit 2a2f44a73a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 127 additions and 151 deletions

View file

@ -27,6 +27,8 @@ import {
} from 'lodash';
import { deleteExternalFiles } from '../types/Conversation';
import { expiringMessagesDeletionService } from '../services/expiringMessagesDeletion';
import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesDeletionService';
import * as Bytes from '../Bytes';
import { CURRENT_SCHEMA_VERSION } from '../../js/modules/types/message';
import { createBatcher } from '../util/batcher';
@ -1090,8 +1092,8 @@ async function saveMessage(
jobToInsert: options.jobToInsert && formatJobForInsert(options.jobToInsert),
});
window.Whisper.ExpiringMessagesListener.update();
window.Whisper.TapToViewMessagesListener.update();
expiringMessagesDeletionService.update();
tapToViewMessagesDeletionService.update();
return id;
}
@ -1105,8 +1107,8 @@ async function saveMessages(
options
);
window.Whisper.ExpiringMessagesListener.update();
window.Whisper.TapToViewMessagesListener.update();
expiringMessagesDeletionService.update();
tapToViewMessagesDeletionService.update();
}
async function removeMessage(id: string) {