swallow exception while saving seen messages

This commit is contained in:
Audric Ackermann 2021-07-30 10:36:25 +10:00
parent 20f5c3b822
commit 7d4ae4ca6b
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
1 changed files with 12 additions and 8 deletions

View File

@ -1915,20 +1915,24 @@ function updateLastHash(data) {
function saveSeenMessageHash(data) {
const { expiresAt, hash } = data;
globalInstance
.prepare(
`INSERT INTO seenMessages (
try {
globalInstance
.prepare(
`INSERT INTO seenMessages (
expiresAt,
hash
) values (
$expiresAt,
$hash
);`
)
.run({
expiresAt,
hash,
});
)
.run({
expiresAt,
hash,
});
} catch (e) {
console.warn('saveSeenMessageHash failed:', e);
}
}
function cleanLastHashes() {