diff --git a/backend/src/services/nextcloud.service.ts b/backend/src/services/nextcloud.service.ts index 575c4b7..1d450ba 100644 --- a/backend/src/services/nextcloud.service.ts +++ b/backend/src/services/nextcloud.service.ts @@ -287,13 +287,15 @@ async function markAsRead(token: string, loginName: string, appPassword: string) } try { - await axios.delete( + await axios.post( `${baseUrl}/ocs/v2.php/apps/spreed/api/v1/chat/${encodeURIComponent(token)}/read`, + { lastReadMessage: null }, { headers: { 'Authorization': `Basic ${Buffer.from(loginName + ':' + appPassword).toString('base64')}`, 'OCS-APIRequest': 'true', 'Accept': 'application/json', + 'Content-Type': 'application/json', }, }, );