Partially working encryption

This commit is contained in:
Henry Hiles 2026-01-06 16:11:21 -05:00
commit 1539235d7d
No known key found for this signature in database
3 changed files with 18 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import "dart:convert"; import "dart:convert";
import "dart:io"; import "dart:io";
import "package:flutter/foundation.dart"; import "package:flutter/foundation.dart";
import "package:matrix/encryption.dart";
import "package:nexus/controllers/database_controller.dart"; import "package:nexus/controllers/database_controller.dart";
import "package:vodozemac/vodozemac.dart" as vod; import "package:vodozemac/vodozemac.dart" as vod;
import "package:flutter_vodozemac/flutter_vodozemac.dart" as fl_vod; import "package:flutter_vodozemac/flutter_vodozemac.dart" as fl_vod;
@ -25,6 +26,7 @@ class ClientController extends AsyncNotifier<Client> {
logLevel: kReleaseMode ? Level.warning : Level.verbose, logLevel: kReleaseMode ? Level.warning : Level.verbose,
importantStateEvents: {"im.ponies.room_emotes"}, importantStateEvents: {"im.ponies.room_emotes"},
supportedLoginTypes: {AuthenticationTypes.password}, supportedLoginTypes: {AuthenticationTypes.password},
verificationMethods: {KeyVerificationMethod.emoji},
database: await MatrixSdkDatabase.init( database: await MatrixSdkDatabase.init(
"nexus", "nexus",
database: await ref.watch(DatabaseController.provider.future), database: await ref.watch(DatabaseController.provider.future),
@ -52,6 +54,12 @@ class ClientController extends AsyncNotifier<Client> {
); );
} }
if (client.userID != null) {
// client.encryption?.keyVerificationManager.addRequest(
// KeyVerification(encryption: client.encryption!, userId: client.userID!),
// );
}
return client; return client;
} }

View file

@ -1640,10 +1640,11 @@ packages:
vodozemac: vodozemac:
dependency: "direct main" dependency: "direct main"
description: description:
name: vodozemac path: dart
sha256: "39144e20740807731871c9248d811ed5a037b21d0aa9ffcfa630954de74139d9" ref: "krille/use-specced-olm-session-config"
url: "https://pub.dev" resolved-ref: "8770e0555b1bb692e3e1a43a7726b27eae285b20"
source: hosted url: "https://github.com/famedly/dart-vodozemac"
source: git
version: "0.4.0" version: "0.4.0"
watcher: watcher:
dependency: transitive dependency: transitive

View file

@ -12,6 +12,11 @@ environment:
sdk: "^3.9.2" sdk: "^3.9.2"
dependency_overrides: dependency_overrides:
vodozemac:
git:
url: https://github.com/famedly/dart-vodozemac
ref: krille/use-specced-olm-session-config
path: dart
analyzer: ^8.4.0 analyzer: ^8.4.0
source_gen: ^4.0.2 source_gen: ^4.0.2