updatePNI: Cleanup only for obsolete PNI
This commit is contained in:
@@ -200,6 +200,7 @@ const dataInterface: ServerInterface = {
|
||||
bulkAddSessions,
|
||||
removeSessionById,
|
||||
removeSessionsByConversation,
|
||||
removeSessionsByUUID,
|
||||
removeAllSessions,
|
||||
getAllSessions,
|
||||
|
||||
@@ -1308,6 +1309,17 @@ async function removeSessionsByConversation(
|
||||
conversationId,
|
||||
});
|
||||
}
|
||||
async function removeSessionsByUUID(uuid: UUIDStringType): Promise<void> {
|
||||
const db = getInstance();
|
||||
db.prepare<Query>(
|
||||
`
|
||||
DELETE FROM sessions
|
||||
WHERE uuid = $uuid;
|
||||
`
|
||||
).run({
|
||||
uuid,
|
||||
});
|
||||
}
|
||||
async function removeAllSessions(): Promise<void> {
|
||||
return removeAllFromTable(getInstance(), SESSIONS_TABLE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user