Allow to get scribePromptUrl from LinagoraEcosystem

This commit is contained in:
Théo Poizat
2026-02-19 14:56:46 +01:00
committed by Dat H. Pham
parent 04696eecd7
commit a98368e6a6
7 changed files with 77 additions and 0 deletions
@@ -58,4 +58,23 @@ class LinagoraEcosystemApi {
}
}
}
Future<String?> getScribePromptUrl(String baseUrl) async {
LinagoraEcosystem? linagoraEcosystem;
try {
linagoraEcosystem = await getLinagoraEcosystem(baseUrl);
} catch (exception) {
if (exception is NotFoundLinagoraEcosystem) {
return null;
}
rethrow;
}
final scribePromptProperty =
linagoraEcosystem.properties?[LinagoraEcosystemIdentifier.scribePromptUrl] as ApiUrlLinagoraEcosystem?;
log('LinagoraEcosystemApi::getScribePromptUrl: scribePromptProperty = $scribePromptProperty');
return scribePromptProperty?.value;
}
}