From 1539235d7d8b14811b23b1d0e92914a68a1397dd Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 6 Jan 2026 16:11:21 -0500 Subject: [PATCH] Partially working encryption --- lib/controllers/client_controller.dart | 8 ++++++++ pubspec.lock | 9 +++++---- pubspec.yaml | 5 +++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/controllers/client_controller.dart b/lib/controllers/client_controller.dart index 1826697..ad25a30 100644 --- a/lib/controllers/client_controller.dart +++ b/lib/controllers/client_controller.dart @@ -1,6 +1,7 @@ import "dart:convert"; import "dart:io"; import "package:flutter/foundation.dart"; +import "package:matrix/encryption.dart"; import "package:nexus/controllers/database_controller.dart"; import "package:vodozemac/vodozemac.dart" as vod; import "package:flutter_vodozemac/flutter_vodozemac.dart" as fl_vod; @@ -25,6 +26,7 @@ class ClientController extends AsyncNotifier { logLevel: kReleaseMode ? Level.warning : Level.verbose, importantStateEvents: {"im.ponies.room_emotes"}, supportedLoginTypes: {AuthenticationTypes.password}, + verificationMethods: {KeyVerificationMethod.emoji}, database: await MatrixSdkDatabase.init( "nexus", database: await ref.watch(DatabaseController.provider.future), @@ -52,6 +54,12 @@ class ClientController extends AsyncNotifier { ); } + if (client.userID != null) { + // client.encryption?.keyVerificationManager.addRequest( + // KeyVerification(encryption: client.encryption!, userId: client.userID!), + // ); + } + return client; } diff --git a/pubspec.lock b/pubspec.lock index e3a9f82..69a7134 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1640,10 +1640,11 @@ packages: vodozemac: dependency: "direct main" description: - name: vodozemac - sha256: "39144e20740807731871c9248d811ed5a037b21d0aa9ffcfa630954de74139d9" - url: "https://pub.dev" - source: hosted + path: dart + ref: "krille/use-specced-olm-session-config" + resolved-ref: "8770e0555b1bb692e3e1a43a7726b27eae285b20" + url: "https://github.com/famedly/dart-vodozemac" + source: git version: "0.4.0" watcher: dependency: transitive diff --git a/pubspec.yaml b/pubspec.yaml index 9551407..32f2cbf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,6 +12,11 @@ environment: sdk: "^3.9.2" dependency_overrides: + vodozemac: + git: + url: https://github.com/famedly/dart-vodozemac + ref: krille/use-specced-olm-session-config + path: dart analyzer: ^8.4.0 source_gen: ^4.0.2