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