Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require encryption key explicitly #373

Merged
merged 6 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions example/src/tests/groupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Group,
ConversationContainer,
ConversationVersion,
syncGroup,

Check warning on line 17 in example/src/tests/groupTests.ts

View workflow job for this annotation

GitHub Actions / lint

'syncGroup' is defined but never used
MessageDeliveryStatus,
} from '../../../src/index'

Expand All @@ -30,7 +30,7 @@
233, 120, 198, 96, 154, 65, 132, 17, 132, 96, 250, 40, 103, 35, 125, 64,
166, 83, 208, 224, 254, 44, 205, 227, 175, 49, 234, 129, 74, 252, 135, 145,
])
const client = await Client.createRandom({

Check warning on line 33 in example/src/tests/groupTests.ts

View workflow job for this annotation

GitHub Actions / lint

'client' is assigned a value but never used
env: 'local',
appVersion: 'Testing/0.0.0',
enableAlphaMls: true,
Expand Down Expand Up @@ -192,11 +192,17 @@
})

test('production MLS V3 client creation throws error', async () => {
const key = new Uint8Array([
233, 120, 198, 96, 154, 65, 132, 17, 132, 96, 250, 40, 103, 35, 125, 64,
166, 83, 208, 224, 254, 44, 205, 227, 175, 49, 234, 129, 74, 252, 135, 145,
])

try {
await Client.createRandom({
env: 'production',
appVersion: 'Testing/0.0.0',
enableAlphaMls: true,
dbEncryptionKey: key,
})
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
Expand Down Expand Up @@ -262,7 +268,7 @@

test('who added me to a group', async () => {
const [alixClient, boClient] = await createClients(2)
const alixGroup = await alixClient.conversations.newGroup([boClient.address])

Check warning on line 271 in example/src/tests/groupTests.ts

View workflow job for this annotation

GitHub Actions / lint

'alixGroup' is assigned a value but never used

const boGroup = (await boClient.conversations.listGroups())[0]
const addedByAddress = await boGroup.addedByAddress()
Expand Down
Loading
Loading