mark chat as read

This commit is contained in:
Matthias Hochmeister
2026-03-13 08:01:55 +01:00
parent 34f246af24
commit f309096497

View File

@@ -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',
},
},
);