getSecret method
Implementation
Future<FileResponse?> getSecret({required String secretId, String? delegatedTo}) async {
final req = <String, dynamic>{"secret_id": secretId, if (delegatedTo != null) "delegated_to": delegatedTo};
final res = await room.sendRequest("secrets.get_secret", req);
if (res is EmptyResponse) {
return null;
}
if (res is FileResponse) {
return res;
}
throw RoomServerException("Invalid response received, expected FileResponse or EmptyResponse");
}