From 39ce0bf4a4cb903a27add0453e62934e98b9c264 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 2 Apr 2025 09:25:14 +0200 Subject: [PATCH] feat: Make dehydrated device name configurable --- lib/encryption/olm_manager.dart | 2 +- lib/src/client.dart | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/encryption/olm_manager.dart b/lib/encryption/olm_manager.dart index bc9e2f09..d1958152 100644 --- a/lib/encryption/olm_manager.dart +++ b/lib/encryption/olm_manager.dart @@ -253,7 +253,7 @@ class OlmManager { await client.uploadDehydratedDevice( deviceId: ourDeviceId!, - initialDeviceDisplayName: 'Dehydrated Device', + initialDeviceDisplayName: client.dehydratedDeviceDisplayName, deviceKeys: uploadDeviceKeys ? MatrixDeviceKeys.fromJson(deviceKeys) : null, oneTimeKeys: signedOneTimeKeys, diff --git a/lib/src/client.dart b/lib/src/client.dart index ce096ad2..264414bf 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -239,6 +239,7 @@ class Client extends MatrixApi { /// When sending a formatted message, converting linebreaks in markdown to ///
tags: this.convertLinebreaksInFormatting = true, + this.dehydratedDeviceDisplayName = 'Dehydrated Device', }) : syncFilter = syncFilter ?? Filter( room: RoomFilter( @@ -376,6 +377,8 @@ class Client extends MatrixApi { bool enableDehydratedDevices = false; + final String dehydratedDeviceDisplayName; + /// Whether read receipts are sent as public receipts by default or just as private receipts. bool receiptsPublicByDefault = true;