* MM-15841: migrate post save to sync by default #10987
* MM-15841: remove variable shadowing #10987
* MM-15841: log error on post save #10987
* MM-15841: nil check post save errors #10987
* MM-15841: update error message on post save #10987
* MM-15841: add nil check on post save in user store test #10987
* [MM-15797] Migrate Session.Remove to Sync by default
* Remove unnecessary channel logic and simplify
* Refactor code to be more consistent with code base
* Rename variable to avoid shadow declaration
* Add missing checks in tests
* Regenerate the mocks
* Run gofmt over code
+ GetTotalMemberCount returns (int64, *model.AppError) now instead of StoreChannel.
+ Updated store mock.
+ Updated code that referenced GetTotalMemberCount to handle the sync result.
* 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
* MM-15302: Migrate `Preference.Delete` to Sync by default #10715
* MM-15302: Migrate `Preference.Delete` to Sync by default #10715
* regenerate store mocks
* fix shadow var
* [MM-16005] Check listOfAllowedChannels to be a not nil empty slice
The problem here had to do with the return type for a `nil`
`[]string`. If `listOfAllowedChannels` is an empty list, that means
that the user doesn't have permissions to view anything, hence we have
to return an empty result. If it is `nil`, there are no restrictions
and we can proceed.
`[]string(nil)` behaves both as a `nil` value and as an "empty" slice,
so this improves the check to be able to distinguish between both
cases.
* Add documentation to the GetViewUsersRestrictionsForTeam function
Adds an exported const string that can be used by plugins to signal a client that the incoming post should be dismissed, instead of the current behavior which just leaves it pending.
* add support for slack corporate export data
* changed tempChannels for channel types. concat after parsing channels
* fix typo
* add fixes suggested by @lieut-data
Re-submitting from #10956
#### Summary
Add pre-packaged plugins to telemetry diagnostics
This includes the following plugins:
- Jira 2.0
- Zoom
- GitHub
- Autolink
- WelcomeBot
- Custom attributes
- Amazon SNS Alerts
#### Ticket Link
https://mattermost.atlassian.net/browse/MM-15833
#### Note
Blocked by https://mattermost.atlassian.net/browse/MM-15824, which transfers the AWS SNS plugin to Mattermost org, and changes the plugin ID to reference mattermost instead of cpanato.
Not queuing for review until the plugin ID has changed in the repository. In the event it's not, I will revert the plugin ID back to `com.cpanato.aws-sns` for telemetry diagnostics.
* Change the implementation of GetAll() in `preference_store.go` to return an
object from `model` and a *model.AppError.
Change the Interface in `store.go` to accomodate for the change
Change the test that called the GetAll() function
* Rename the result variable to preferences so it makes more sense.
Use assertions to keep the test consistent
* Generate the correct mocks after the code changes
* Remove redundant conditions
* Address govet errors
* Resolve conflicts with master's new changes
* Fix Save() function according to the new changes in master (Got
overwritten with the previous commit)
* Change the assertions to have the same format as commit 2d97f01
* migrating get posts to sync by default
* flow control and style changes
* style changes, error checking
* pulling master down
* counting missed cache, not hit
* fixing bad conflict resolution
* forcing rebuild