"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.