Files
mostlymatter/api4
Kyriakos Z 79e36d4596 [MM-41185]: new API to mark thread as unread (#19951)
* [MM-41185]: new API to mark thread as unread

Until now we mark a thread as read/unread by sending a timestamp to the
server. This created some issues when marking a thread as unread from a
post. We needed to send the post.create_at - 1 as a timestamp but we
didn't do so consistently.

This commit adds a new API to set a thread as unread by post id.
Making all clients agnostic of the timestamp, and thus solving consistency issues.

Endpoint: /api/v4/users/{user_id}/teams/{team_id}/threads/{thread_id}/set_unread/{post_id}

* Updates client.go adding SetThreadUnreadByPostId

* Guards endpoint behind read channel permission

* Returns status 400 if post_id not belong in thread

* Root post as post_id should be permitted
2022-04-15 10:55:47 +03:00
..
2022-02-28 15:01:00 +05:30
2021-09-01 14:43:12 +02:00
2022-04-11 19:31:19 +05:30
2022-02-28 15:01:00 +05:30
2022-04-11 20:51:33 +05:30
2021-09-01 14:43:12 +02:00
2021-08-17 16:08:04 -04:00
2022-02-28 15:01:00 +05:30
2022-04-11 19:31:19 +05:30