swallow exception while saving seen messages
This commit is contained in:
parent
20f5c3b822
commit
7d4ae4ca6b
20
app/sql.js
20
app/sql.js
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue