* add webhook id to logs
* Move hook_id context to api level from app level.
* pass errCtx to other references of same app-error-id
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* ensure user has invite team permission in order to change setting
* add tests and handle UI
* lint fixes
* revert changes to invite section input
* update tests
* revert bad merge
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Removed test_update_user_auth_plugin from golangci
The test_update_user_auth_plugin has been removed from the .golangci.yml configuration file. This change simplifies the linting process by excluding unnecessary files.
* Refactored error handling in user auth tests
The error handling for the 'expectUserAuth' function within the user authentication plugin tests has been refactored. Previously, errors were not being explicitly checked after each call to this function. Now, an error check is performed after each invocation and if an error is found, it's immediately returned. This change improves the robustness of our test suite by ensuring that potential issues are caught and handled appropriately during testing.
* Refactor error handling in UpdateUserAuth
The error handling in the UpdateUserAuth function has been refactored. The variable 'err' was replaced with 'appErr' to better reflect its purpose and improve code readability.
* Updated user authentication in plugin API
The user authentication method in the plugin API has been updated. Previously, it was fetching the user based on a static configuration value. Now, it fetches the user dynamically using the provided userID. This change makes the function more flexible and adaptable to different use cases.
* Updated golangci configuration
Removed a test file from the exclusion list in the golangci.yml configuration. This will allow linting checks to be performed on this previously excluded file, improving code quality and consistency.
* Updated golangci configuration
Removed a test file from the exclusion list in the golangci configuration. This will ensure that our linting tools also cover this previously excluded test file, improving overall code quality checks.
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
We don't clear the Redis cache for every test.
This can cause issues because the cache is shared
across test. We fix that with this PR.
```release-note
NONE
```
https://mattermost.atlassian.net/browse/MM-59935
```release-note
Redis is now available as an alternative cache backend for all enterprise customers. It can be leveraged to run Mattermost at very high scale. There is a new section in config.json that can be updated to use Redis.
CacheSettings.CacheType: This can be either lru or redis. "lru" is the default choice which will use the in-memory cache
store that we use currently.
CacheSettings.RedisAddress: The hostname of the Redis host
CacheSettings.RedisPassword: The password of the Redis host. (Can be left blank if there is no password)
CacheSettings.RedisDB: The database of the Redis host. Typically 0.
CacheSettings.DisableClientCache: This can be set to true if you decide to disable the client-side cache of Redis. Typically there is no need to do this in production, and this is mainly used as a test option.
```
Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* [MM-59375] Use `readMultipleChannels` to mark as read on server as well
* Fix types
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-61782 - fix invalid time when changing to today after 9 am
* reset time interval to correct value
* Updated time reset logic
---------
Co-authored-by: Harshil Sharma <harshil.sharma@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
There were couple of errors in the test:
1. UpdatedScheduledPost will automatically
set the ProcessedAt to now internally inside
toUpdateMap. So setting the value from outside
has no effect.
2. The bug was that if it took more than a
milisecond to capture the time, and then
do the internal call, then the Get call
will have a higher value and therefore fail.
Since UpdatedScheduledPost doesn't return
an updated post, so there is no need
to compare the timestamps at all.
```release-note
NONE
```
* Stop recording unknown platforms as "Windows" in Sessions table
* Add more tests to user_agent_test.go
* MM-61012 Add special handling to OS detection for mobile apps
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Update sass-loader@16.0.2
* Update sass part 1 (actually update it)
* Update scss files to remove at-charset and use at-use instead of at-import
at-charset hasn't been needed since we switched to dart-sass, and
at-import is now deprecated. Most of this was done using sass-migrator.
We still use at-import for files imported from node_modules, but sass
doesn't seem to complain about that
* Inline at-extend rule that was causing an error
* Remove or inline at-use rules in components package