mattermost/web
Saturnino Abril b832985f1d MM-11210 Add "GET /posts/unread" API to support landing on the last unread post (#11486)
* [MM-11210] Add API GET 'api/v4/channels/{channel_id:[A-Za-z0-9]+}/posts/unread' for scrolling overhaul (#9108)

* Add API GET 'api/v4/channels/{channel_id:[A-Za-z0-9]+}/posts/unread'

* add constants

* refactor GetPostSince and added more tests

* move constants to app package

* [MM-11528 &&  MM-11583] Add userId to in the "posts/unread" path and update test with time delay to fix intermittent failure (#9229)

* add userId to in the "posts/unread" path and update test with time delay to fix intermittent failure

* add limit before and after to query

* remove time delay on test and put pretermined value of Post.CreateAt

* Fix conflict

* [MM-11876] Add cursor to posts list such as next_post_id and previous_post_id (#9707)

* add cursor to posts list such as next_post_id and previous_post_id

add publish previous_post_id on WEBSOCKET_EVENT_POSTED and only get next or previous post IDs if necessary

revert change on adding previous_post_id in WEBSOCKET_EVENT_POSTED

add missing strings import

fix merge conflicts

* update per comment

* update per feedback

* corrected the logic in getting the next and previous post ID

* fix logic to determine next and post IDs, and rename function to have suffix of "Time"

* rearrange logics and add mote tests

* fix merge conflict

* fix missing message when using unread API (#10233)

* MM-15569 Fixes failing test on TestGetPostsForChannelAroundLastUnread (#11039)

* Fix missing posts when getting posts since

* revert changes to GetPostsSince

* migrate Post.GetPostAfterTime and Post.GetPostBeforeTime to sync by default

* revert change to cacheItem

* Fix post ID validation, build query on squirrel and only return post ID as necessary
2019-07-04 02:53:04 +05:30
..
context.go Fix bots being unable to post when personal access tokens are disabled. (#11105) 2019-06-13 11:54:09 -07:00
context_test.go Refactor context out of API packages (#8755) 2018-05-14 10:24:58 -04:00
handlers.go MM-15889 Add unit tests for CSRF checks (#11058) 2019-06-11 15:09:00 -04:00
handlers_test.go MM-15889 Add unit tests for CSRF checks (#11058) 2019-06-11 15:09:00 -04:00
main_test.go MM-15276: Migrate Team.Update to sync by default (#10693) 2019-04-25 15:29:02 +02:00
params.go MM-11210 Add "GET /posts/unread" API to support landing on the last unread post (#11486) 2019-07-04 02:53:04 +05:30
saml.go MM-15889 Add unit tests for CSRF checks (#11058) 2019-06-11 15:09:00 -04:00
static.go MM-14052: Fix subpath rewrite again (#10252) 2019-02-11 21:21:23 -05:00
web.go MM-15835: correct errors and content types for oauth api calls (#10999) 2019-05-30 13:23:26 -04:00
web_test.go [MM-15490] Rework default password requirements (#10844) 2019-05-21 11:03:36 -07:00
webhook.go MM-11701 Log request ID for outgoing webhooks (#10513) 2019-05-17 06:48:32 -07:00
webhook_test.go MM-13893: refactor config (#10230) 2019-02-12 08:37:54 -05:00