a87977241c
Replaces legacy chat encryption modules with new sodium-based implementation. Adds and updates API routes for chat key management and debugging, introduces new hooks and scripts for sodium chat, and updates related database schema and configuration. Removes old crypto modules and updates dependencies accordingly.
17 lines
408 B
TypeScript
17 lines
408 B
TypeScript
import { db } from '../src/db';
|
|
import { chatDeviceBundles } from '../src/db/schema';
|
|
|
|
async function clearChatKeys() {
|
|
console.log('Clearing all chat device bundles...');
|
|
|
|
const result = await db.delete(chatDeviceBundles);
|
|
|
|
console.log('Cleared chat device bundles');
|
|
process.exit(0);
|
|
}
|
|
|
|
clearChatKeys().catch((error) => {
|
|
console.error('Failed to clear keys:', error);
|
|
process.exit(1);
|
|
});
|