в поле ввода соо динамично показывается что мы и как отметили, форматированные соо не отправляются при шифровании

This commit is contained in:
jganenok
2025-12-04 21:20:52 +07:00
parent c945d57371
commit d5809ba597
2 changed files with 36 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ class ChatEncryptionConfig {
factory ChatEncryptionConfig.fromJson(Map<String, dynamic> json) {
return ChatEncryptionConfig(
password: (json['password'] as String?) ?? '',
sendEncrypted: (json['sendEncrypted'] as bool?) ?? false,
sendEncrypted: (json['sendEncrypted'] as bool?) ?? true,
);
}
}
@@ -54,7 +54,7 @@ class ChatEncryptionService {
if (legacyPassword != null && legacyPassword.isNotEmpty) {
final legacyConfig = ChatEncryptionConfig(
password: legacyPassword,
sendEncrypted: false,
sendEncrypted: true,
);
await _saveConfig(chatId, legacyConfig);
return legacyConfig;