"Mark as read" endpoint for rooms?

Hey all. Iā€™m building my own custom client for Spreed, but canā€™t seem to figure out what the endpoint is to mark a room as read?

Iā€™ve found https://nextcloud-talk.readthedocs.io/en/latest/chat/#mark-chat-as-read, however that doesnā€™t seem current.

Would anyone be able to help me with this?

Hi there,

that is still the current endpoint and in case it is not working as expected, feel free to open an issue in the github repository:

But to support old clients and not break their behaviour by default we also set the read marker when you poll for new messages.
So in case you donā€™t want that but set the read-marker yourself, make sure to add setReadMarker=0 to the requests you do to fetch messages.

I am sending a POST request to /ocs/v2.php/apps/spreed/api/v1/chat/rcz2xagq/read, however, according to the response itā€™s not a valid query.

Iā€™m getting the following response

<ocs>
 <meta>
  <status>failure</status>
  <statuscode>404</statuscode>
  <message>Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.
</message>
 </meta>
 <data/>
</ocs>

Whatā€™s interesting is that this endpoint also doesnā€™t appear to be called from spreed, or any endpoint with ā€œreadā€ in the URL for that matter.

It also doesnā€™t appear to mark the rooms as read when I fetch the messages from /ocs/v2.php/apps/spreed/api/v1/chat/MYROOMTOKEN?lookIntoFuture=0&includeLastKnown=1, although thatā€™s actually fine with me.

Any ideas?

Yeah grabbing the history doesnā€™t mark as read. Do a request for lookIntoFuture=1

Ups, thatā€™s a shame. Let me look into this and thanks for notifying.