* MM-16272 - Synchronize plugins across cluster (#11611)
* MM-16272 - Synchronize plugins across cluster
* Adding a test
* MM-16272 - Fixed tests
* MM-16272 - PR feedback
* MM-16270 - Plugin Sync (#11615)
* Initial implementation for plugin synch with file store. WIP
* Removed ListAll implementation. Used ListDirectory and change localstore to be consistent and return all items (files and folders) from directory
* Refactored plugin filestore operations out of main install/remove plugin
* Fixing error handling details
* Changes to use structured logging
* More logging fixes
* Wording and comments improvements
* Error handling and control flow improvements
* Changed managed flag check to use os.stat
* Added file store plugin dir and filename consts
* Replaced FileRead to use a the FileReader in PluginSync
* Minor styling and PR feedback changes
* Minor error handling improvements
* Added unit test for SyncPlugins. Changed SyncPlugins to use plugins environment to list available plugins
* PR Feedback improvements
* Minor err handling fix
* Removing FileStorePath from PluginEventData (#11644)
* Fix plugin path (#11654)
* tweak path, logging
Fix an issue not finding the plugins folder in S3. Tweak logging messages to add additional clarity.
* Removing FileExists check when Syncing plugins. Updated localstore to not return an error when directory does not exist
* PR Feedback
* Install prepackaged plugins locally only (#11656)
* s/uninstall/remove
* Updated ClusterMessage comment
* Updated PluginSync to test against s3 + local storage
* fix posts returned from unread API when the list contains parent post/s
* add ExtendAll to PostList and update test per feedback
* revert unintentional change to the other test and fix comment
* update the existing postlist.Extend, filter unique values and update unit tests
* MM-16872 - Extend Plugin API to set LHS bot icon
* MM-16872 - Using ReadSeeker as opposed to Reader for reading svg image file
* MM-16872 - PR feedback
* MM-16872 - Using userId rather than bot.UserId
* MM-16872 - Minor stylistic changes
* MM-16872 - Removing DriverName check
* 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-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
* 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
* when converting a bot to a user, set the role to system_user
* correct govet shadow error
* Change from inline error checking and fix shadow error
* Add SYSTEM_USER_ROLE_ID to the bot user model instead of updating the
role after the bot user is created
* modify UserFromBot test to include Roles field
* Initial implementation of plugin remote source
* Implement API route
* Test API route
* Add i18n
* Handle different error cases in API route
* Include missing i18n translation
* Include AllowInsecureDownloadUrl in telemetry capture
* Updates from PR feedback
* Use HTTPService instead of http.Get
* Remove InstallPluginFromUrlForced from client4
* Use net/url library to inspect url scheme
* remove PluginDownloadUrl from web/params.go
* Allow plugin downloads from internal sources
* Move State property from activePlugin to PluginHealthStatus. env.activePlugins is now reserved for healthy running plugins.
* Add comments for function declarations
* Combine activePlugins and pluginHealthStatuses into a common structure, registeredPlugins
* Add check to see if plugin is active before deactivating it
* Make `Deactivate` set plugin status
* Add comment explaining the `registeredPlugins` map
* Give responsibility to set plugin disabled status upon deactivation back to `env.Deactivate`
* check if plugin needs to be deactivated before setting status
* [MM-16244] Add Elasticsearch SkipTLSVerification parameter to the config
* Add SkipTLSVerification config parameter to the diagnostics
* Update diagnostics key for consistency
Co-Authored-By: George Goldberg <george@gberg.me>
* [MM-13500] Adds channel /search_group endpoint
* Add LIMIT to the queries
* Fix i18n extract
* Fix tests
* Add a new endpoint to get profiles by group channel ids
* Rebase fix
* MM-2954
* Added new const post type for /me commands
* Modified me command to return response text without *__* wrapper
* Modified unit test for MeCommand to reflect changes
* Added unit test for the me command provider
* * Reverted change to text property in me command response
* Added original message in me command response props
* Updated unit tests
* gofmt changes
* Add system ping endpoint health checks
This change adds the option for additional server health checks
to be performed when the system ping endpoint is hit. An additional
field 'getserverstatus' is required to run the enhanced health
checks to ensure previous default ping behavior is not modified.
* Use snake_casing
* MM-16258: Adds new API endpoint + (App & Client & Store) to retrieve Users who would be removed from a list of hypothetical group IDs representing the synced groups.
* MM-16258: Adds roles to JSON response.
* MM-16258: Updates GetByIDs to use Squirrel.
* MM-16258: Puts as much as possible into Squirrel.
* MM-16258: Changes names of methods, functions, and route.
* MM-16258: Updates some comments.
* MM-16258: Extra validation of group_ids parameter.
* MM-16258: Changes validation of group_ids query param.
* MM-16258: Rename a variable and a constant.
* MM-16258: Fix test.
* Truncate strings from OpenGraph metada
* remove unwanted opengraph fields, limit to 1 image
* test helper functions
* Add truncating test
* fix typo
* change test into not comparing for the pointer value
* truncate only once
* only shorten fields that were already present
* set maximum of 5 images
* fix original tests
* fix test
* limit to 5 images
* fix typo
* place functions below types, simplify function commentaries
* Rewrite how to empty opengraph's structure
* create/update config.json using go generate
* added default config generator
added config-reset to Jenkins and make package, updated defaults to consider 'isNew' flag
* corrections after code review
* fixed Config.isValid to handle empty encryption keys
* fixed Config.isValid to handle empty encryption keys
* fixed Config.isValid to handle empty encryption keys
* isUpdate now only checks for nil
* Addressed review comments, added unit testing for default config generator
* err shadowing
* license
* provide output file for config generator via ENV variable, since go generate doesn't support arguments and we need two output paths (config-reset and package)
* cleanup
* proper defaults for PushNotificationServer and SendPushNotifications
* corrected generating defaults for TrustedProxyIPHeader to be consistent with default.json in master
* Check for empty SiteURL as well as nil
* corrected SiteURL settings and checking
* crazy typos fixed
* corrected tests to newly expected values
* relaxed the checks
* fixed formatting
* Add config setting to explicitly define which IP headers are trusted
* fix variable shadowing
* Optimize code flow; Add Ratelimit test for header set
* Extend Ratelimit tests
* Add additional unit tests
* Structured logging
* MM-15422: Adds new parameters for retrieving pages of channels and searching channels.
* MM-15422: Appends excluded channel names with defaults. Adds separate struct for data-tier option parameter.
* MM-15662 change conflig flag to EnableBotAccountCreation
* undo changes to i18n
* MM-15662: Change config flag for bot creation
adds newline to i18n
* MM-15662 Update diagnostics.go to use new config flag
* Rework default password requirements
* Update API Test Lib Default User PW
* Remove unused function; Disable password reqs in dev mode
* Disable strict password requirements for unit tests
* Update unit tests