* MM-16543 Add mocking for einterfaces packages
* MM-16543 Fix Elasticsearch only returning one page of results
* Remove license checks for einterface mocks
* MM-16548: Fixing bug with empty type in the second line of the bulk import
* Adding tests to this behavior
* Changing the approach to fix the problem
* MM-15452 - Add ability to override LHS icon for bot accounts
* MM-15452 - Added translations
* MM-15452 - Updated GetIconImage test to check returned image
* MM-15452 - Added Delete handler for /icon endpoint, invalidating user cache on set/delete
* MM-15452 - Moved /icon routes under bot/, addressed other pr feedback
* MM-15452 - More conflict resolutoin
* MM-15452 Restoring api4/user.go
* MM-15452 - Using require as opposed to t for test assertions
* MM-15452 - Updated as per PR feedback
* MM-16796: reduce plugin job interval to once per day
The Jobs infrastructure isn't currently setup for running frequent jobs,
as it spams the Jobs table with useless records. Update the plugin job
interval to run less frequently -- since the cleanup doesn't affect
semantics anyway -- and clean up the previously created entries in the Jobs table.
* [MM-16719] fixing reflection: now recursing on value, not interface
adding defaults to cfgWithoutEnvOverrides
adding tests
* don't modify the minimalConfig
* move kv helpers to helpers_kv*.go
* change KVGetJSON return signature
Return a boolean and an error, to clearly indicate if no value was found and thus no value unmarshalled into the target interface.
Also fix an issue with CompareAndSet to allow an oldValue of nil (i.e.
expected to be unset).
* add missing license
* tweak documentation
* document KVSetWithExpiryJSON minimum version
* changed GetProfilesByUsernames signature
* modified the UserStore interface to reflect changed made to the GetProfilesByUsernames function signature
* modify usages of GetProfilesByUsernames
* fix gofmt
* fixed failing userstore tests
* MM-16506: conditionally build go.mod for plugins
Unless `GO111MODULE=off`, generate a `go.mod` that points at the local copy of `mattermost-server` to ensure plugin tests that compile source code on demand always test with the local copy of mattermost-server. This also fixes an issue with early adopters of `GO111MODULE=on` on the server failing to find the right version of go-i18n dependencies.
* plugin: enable testlib resource management
* customize fileutils.Find* for testlib
* [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
Properly handle analytics client life cycle
This change improves the life cycle management of the analytics
client. It does so in two primary ways:
- Move the client from being a shared pointer to belonging to the
Server struct.
- Expose the client.Close() method for proper shutdown of the
client.
* Add ability to get bot counts per day
Modify tests using AnalyticsPostCountsByDay to include extra input
(botsOnly)
Correctly generate the mock file with 'make store-mocks' target. Didn't
see these comments earlier
* Initial commit for calculating total posts previous day and total posts
from bots previous day
* - Refactor to use asserts instead of if statements in tests
- Capture inputs to AnalyticsPostCountsByDay() function into an
options struct
- Remove bot creation from diagnostics_test.go.
* Remove utils library
* create AnalyticsPostCountsOptions struct which is accepted as an input
to AnalyticsPostCountsByDay method
* Go vet fixes
* [MM-11345] Migrated TokenStore.RemoveAllTokensByType to Sync by default (#11345)
* changed TokenStore.RemoveAllTokensByType to return *model.AppError
* changed test coverage accordingly in store/storetest/mocks
* Fixing mocks