fix(broker): correct libsodium import in email connect callback
Dynamic import returns module wrapper, need .default.ready then .default for the actual sodium functions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4180,8 +4180,9 @@ function main(): void {
|
|||||||
const existingMembers = Array.from(meshIds).map(meshId => ({ meshId }));
|
const existingMembers = Array.from(meshIds).map(meshId => ({ meshId }));
|
||||||
|
|
||||||
// For each mesh, create a new bridge member with a fresh keypair
|
// For each mesh, create a new bridge member with a fresh keypair
|
||||||
const sodium = await import("libsodium-wrappers");
|
const sodiumMod = await import("libsodium-wrappers");
|
||||||
await sodium.ready;
|
await sodiumMod.default.ready;
|
||||||
|
const sodium = sodiumMod.default;
|
||||||
const results = [];
|
const results = [];
|
||||||
for (const em of existingMembers) {
|
for (const em of existingMembers) {
|
||||||
const kp = sodium.crypto_sign_keypair();
|
const kp = sodium.crypto_sign_keypair();
|
||||||
|
|||||||
Reference in New Issue
Block a user