* [MM-52445] Fix double url encoding of oauth redirect URI params
* Additional test based on code review
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Simplify workflow failure check
Consolidate the workflow failure check directly into *-master.yml. This results in some code duplication, but makes it much clearer as to what's going on. While we're in here, remove the legacy reference to the `monorepo` branch when triggering.
* just remove the workflow in favour of the Argo version
* Change renderWithFullContext to not mock Redux store
* Remove renderWithIntl and renderWithIntlAndStore
* Rename renderWithFullContext to renderWithContext
* Use renderWithContext for WS context
* MM-54238 Initial implementation
* MM-54238 Move websocket hook into app package
* MM-54238 Add tests for mentions in posted websocket messages
* Fix styling
* Fix other styling
* Idiomatic ID naming for new code
* Fix more styles
* Separate hooks to add mentions and followers
* Improved error handling for invalid types in hooks
* Rename HasChanges to ShouldProcess
* Pass broadcast hooks through hubStart
* Add test helper for asserting json unmarshaling
* Fix missing arguments in tests
* Ensure broadcast hooks are sent across the cluster and not to users
* Ensure tests actually cover following a post
* Fix code broken by merge
* Go vet again...
* Deep copy event before processing it with hooks
* Replace RemoveBroadcastHooks with WithoutBroadcastHooks
* Address feedback
* Add helper to fix type information for hook args
* Wrap WebSocketEvent and simplify BroadcastHook
* Address feedback
* Address feedback
* feat(channel-chat): MM-53360 Scroll to the bottom of channel chat
This commit adds new toast to the channel chat, which allows users to
scroll to the bottom quickly.
As it is needed to be along side with the `Search hint toast`, I needed
to adjust the code inside `hint_toast, toast_wrapper` more than
expected.
- [x] Updated tests/snapshots
* refactor(scroll-to-bottom): MM-53360 Replace if block => separated func
* style: MM-53360 Fix order of imports
* refactor(scroll-to-bottom): MM-53360 Simplify hideScrollToBottonToast
* test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test
This commit migrates unit tests from `enzyme` to `react-testing-library`.
Besides, it adds new test ids for testing purposes.
* fixup! test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test
* style: MM-53360 Fix eslint error
* style(hint_toast): MM-53360 Update style to match the design
Decrease the size, and increase the font-weight of the shortcut key.
See more at: https://www.figma.com/file/gbnx8ydTX0bTFIbJ8NWGfR/MM-53360-Scroll-to-bottom-of-chat?type=design&node-id=1101-21615&mode=dev
* feat(scroll-to-bottom): MM-53360 Change condition to show toast
- Hide the toast after clicking "Jump to recents".
- Do not show the toast if the user dismissed it before.
* fixup! feat(scroll-to-bottom): MM-53360 Change condition to show toast
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* update session roles from user roles.
* update so user is not retrieved again
* return error, rather than log warning
* Update session.go
Fix bad merge
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* feat: add log warn when app is run as root user
* Modify warning message
* Move warning message condition to L415
* move check to cmd/mattermost/main.go
* Update server/channels/app/server.go
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
* Moved checkForRootUser to root.go
* format root.go
* remove unnecessary space
---------
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Marshalling a json.RawMessage is not zero overhead. Instead,
it compacts the raw message which starts to have an overhead
at scale.
https://github.com/golang/go/issues/33422
Since we have full control over the message constructed, we
can simply write the byte slice into the network stream.
This gives considerable performance boost.
```
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost/server/public/model
cpu: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
│ old.txt │ new_2.txt │
│ sec/op │ sec/op vs base │
EncodeJSON-8 1640.5n ± 2% 289.6n ± 1% -82.35% (p=0.000 n=10)
│ old.txt │ new_2.txt │
│ B/op │ B/op vs base │
EncodeJSON-8 528.0 ± 0% 503.0 ± 0% -4.73% (p=0.000 n=10)
│ old.txt │ new_2.txt │
│ allocs/op │ allocs/op vs base │
EncodeJSON-8 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=10)
```
P.S. No concerns over changing the model API because we are
still using 0.x
https://mattermost.atlassian.net/browse/MM-54998
```release-note
Improve websocket event marshalling performance
```
* Rework some of PR24647
* Store MM_LICENSE to .env.server file
* Remove legacy network setup
* Fixes, generate docker-compose and env files in one place
* Simplify templating mechanism for server.yml
* Fix race condition for dashboard start
* Fix websockets for local debugging
* Fix: make webhook-interaction work again
* Simplify and fix dashboard&cloud configuration, formatting fix
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
* Make use of GenericStoreResult in channels/app/channel.go
---------
Co-authored-by: fazil-syed <fazil@Gojo>
Co-authored-by: Mattermost Build <build@mattermost.com>