* MM-30041: Return correct error message for user save
We were collapsing all types of user conflict into a single
error message. Fixed it by inspecting the field of the invalidError type
and returning the correct message.
https://mattermost.atlassian.net/browse/MM-30041
```release-note
NONE
```
* Fix test errors
* Fix wrong message in test when comparing error messages
Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
* MM-29979: make websocket writes zero-alloc
Instead of allocating a new slice every time we write a message,
we create a json encoder for a byte buffer and then reset the buffer
every time we write a new message.
This allocates a buffer of a constant size per-connection, but gets rid
of a new allocation for every single write, reducing pressure on GC.
After taking a distrbution of message sizes from a load test, it was seen that
2k is a good enough buffer size within which 98.5% of messages remain.
Taking a look at the alloc profiles for (*webconn).writepump:
- master branch: 8.01% of total allocations totalling 64GB
- with this PR: 4.92% and 10GB.
https://mattermost.atlassian.net/browse/MM-29979
* Skip writing in case of an encoding error
It's was including it in the bin folder but when we package we need to include it in the dist/bin so right now the `download_mmctl` script accepts a second parameter to define the path where the binary is going to be stored
* Document extractor service
* Fixing vendor modules
* Addressing PR Review comments
* Some small simplifications
* Fixing a linter complain
* simplifying a bit the code using package variables
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Adding files, commit of UI in good shape
* Translations added, working with activation and deactivation
* Add check for error
* Fix i18n?
* Push without subscription check so Steve and Matt can look at it
* Fix font-weight in chrome
* Fix font-weight on button
* UX fixes
* Fixes for PR
* Add back subscription stuff
* Fix tests
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-27909: Add manage_shared_channels permission
We add a new permission to manage shared channels.
It's a channel scoped permission and only the system admin
has that by default.
https://mattermost.atlassian.net/browse/MM-27909
* change to system scoped
* Trigger CI
* Trigger CI
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-29525: Strip path_prefix from ListDirectory
An AWS path prefix is meant to be an implementation detail
which the calling application should not be aware of. Hence, we should
strip the path prefix when returning objects in a directory
because they anyways get applied while using the other APIs
https://mattermost.atlassian.net/browse/MM-29525
* simplify
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Thread autoresponse posts with the post they are autoresponding to
* Remove unneeded if
* Remove ParentID references
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Update to get latest release from S3
* Update mmctl to download to use S3
* Download MMCTL from S3
* Update download_mmctl_release.sh
* Update Makefile
* Update release.mk
* Update the script called, remove call to sub shell and clean up indentation
* Add quotes around THIS_BRANCH var
* Update script to support overriding the OS for packaging
* Add check for release-<Digit> to better match the branch
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Update to get latest release from S3
* Update mmctl to download to use S3
* Download MMCTL from S3
* Update download_mmctl_release.sh
* Update Makefile
* Update release.mk
* Update the script called, remove call to sub shell and clean up indentation
* Add quotes around THIS_BRANCH var
* Update script to support overriding the OS for packaging
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-28815: Optimizes message export query.
* MM-28815: Removes DeleteAt WHERE condition.
* MM-28815: Adds Id to the ORDER BY clause.
* MM-28815: Concatenates the string to remove the confusing '%%' in the query.
* MM-28115: Remvoes secondary sorting.
* MM-28815: Keeps the alias in the order by.
* MM-28815: Removing forced index.
* MM-28815: Formatting.
* MM-29572: Add Bifrost support to codebase
We use a custom transport for minio when an environment variable
indicates that Mattermost is running in cloud.
The transport is used to redirect the request to the S3 endpoint set
in the config. And the scheme is set depending on if S3SSL is set.
A custom credentials provider is needed to return empty credentials
which will be overridden by the service anyways. This is just to allow
the minio client library to work transparently without knowing that
there is something else in the middle intercepting requests.
https://mattermost.atlassian.net/browse/MM-29572
* incorporate review comments
* Update services/filesstore/s3_overrides.go
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
* Change to new env key
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>