Merge branch 'fixes/fix-error-sharing-file-in-talk' into releases/release-h2f

This commit is contained in:
Tiavina 2025-03-25 17:13:31 +03:00
commit 0d14f7721a

View File

@ -26,6 +26,7 @@ declare(strict_types=1);
namespace OCA\Gestion\Service;
use GuzzleHttp\Exception\GuzzleException;
use OCP\DB\Exception;
use OCP\IUserSession;
use OCP\Mail\IMailer;
@ -454,6 +455,7 @@ class GestionService {
}
public function sendFileAttachmentToTalk($roomToken, $cookie , $fileName ) {
try{
$host = 'http://127.0.0.1';
$client = \OC::$server->getHTTPClientService()->newClient();
$token = file_get_contents("$host/ocs/v2.php/core/getcsrftoken", false, stream_context_create([
@ -476,4 +478,11 @@ class GestionService {
]
]);
}
catch(GuzzleException $e){
$this->logger->debug("error sending file to talk");
}
catch(Exception $e){
$this->logger->debug("error sending file to talk");
}
}
}