refactor: Get rid of unnecessary type cast
This commit is contained in:
parent
70af77b3ac
commit
0a6a813804
|
|
@ -399,7 +399,7 @@ class Encryption {
|
||||||
return encryptedPayload;
|
return encryptedPayload;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> encryptToDeviceMessage(
|
Future<Map<String, Map<String, Map<String, dynamic>>>> encryptToDeviceMessage(
|
||||||
List<DeviceKeys> deviceKeys,
|
List<DeviceKeys> deviceKeys,
|
||||||
String type,
|
String type,
|
||||||
Map<String, dynamic> payload) async {
|
Map<String, dynamic> payload) async {
|
||||||
|
|
|
||||||
|
|
@ -631,7 +631,7 @@ class OlmManager {
|
||||||
return encryptedBody;
|
return encryptedBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> encryptToDeviceMessage(
|
Future<Map<String, Map<String, Map<String, dynamic>>>> encryptToDeviceMessage(
|
||||||
List<DeviceKeys> deviceKeys,
|
List<DeviceKeys> deviceKeys,
|
||||||
String type,
|
String type,
|
||||||
Map<String, dynamic> payload) async {
|
Map<String, dynamic> payload) async {
|
||||||
|
|
|
||||||
|
|
@ -2617,8 +2617,10 @@ class Client extends MatrixApi {
|
||||||
|
|
||||||
// Send with send-to-device messaging
|
// Send with send-to-device messaging
|
||||||
final data = await encryption.encryptToDeviceMessage(
|
final data = await encryption.encryptToDeviceMessage(
|
||||||
deviceKeys, eventType, message)
|
deviceKeys,
|
||||||
as Map<String, Map<String, Map<String, dynamic>>>;
|
eventType,
|
||||||
|
message,
|
||||||
|
);
|
||||||
eventType = EventTypes.Encrypted;
|
eventType = EventTypes.Encrypted;
|
||||||
await sendToDevice(
|
await sendToDevice(
|
||||||
eventType, messageId ?? generateUniqueTransactionId(), data);
|
eventType, messageId ?? generateUniqueTransactionId(), data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue