Future<String?> getDecryptedText(String source, String msg) async {
try {
SessionCipher session = SessionCipher.fromStore(signalStore,
SignalProtocolAddress(source, SignalHelper.defaultDeviceId));
Map data = jsonDecode(msg);
if (data["type"] == CiphertextMessage.prekeyType) {
PreKeySignalMessage pre =
PreKeySignalMessage(base64Decode(data["msg"]));
Uint8List plaintext = await session.decrypt(pre);
String dectext = utf8.decode(plaintext);
log("type $dectext");
return dectext;
} else {
return null;
}
} catch (e) {
log(e.toString());
return null;
}
} while running this I'm getting this issue: Instance of 'UntrustedIdentityException'.