feat: Prevent sending messages if other party has no encryption keys
This commit is contained in:
parent
8cb06d602b
commit
aa010767de
5 changed files with 60 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import 'package:mime/mime.dart';
|
|||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_file_extension.dart';
|
||||
import 'package:fluffychat/utils/other_party_can_receive.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/size_string.dart';
|
||||
import 'package:fluffychat/widgets/adaptive_dialogs/adaptive_dialog_action.dart';
|
||||
|
|
@ -44,6 +45,9 @@ class SendFileDialogState extends State<SendFileDialog> {
|
|||
final l10n = L10n.of(context);
|
||||
|
||||
try {
|
||||
if (!widget.room.otherPartyCanReceiveMessages) {
|
||||
throw OtherPartyCanNotReceiveMessages();
|
||||
}
|
||||
scaffoldMessenger.showLoadingSnackBar(l10n.prepareSendingAttachment);
|
||||
Navigator.of(context, rootNavigator: false).pop();
|
||||
final clientConfig = await widget.room.client.getConfig();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue