* Adds default team to the remote cluster entity
A new DefaultTeamId field is added to the RemoteCluster entity and its
endpoints, and used when receiving channel invites to choose in which
team to create a new channel.
This will be later extended with the ability for the system admin to
manually accept invites, choosing which team to create the channel on
each. This use case will be triggered when the DefaultTeamId field is
empty, which now simply chooses the first team it finds in the
database as a fallback.
* Fix migrations list
* Fixes channelinvite test case
* Fix i18n
* Fix migration list
* Allows creating new remote clusters without providing a password
If the endpoint receives a request with no password, it will generate
one internally and return it in the response, so the frotend can show
it to the user.
* Use a random string instead of a UUID for the generated password
* Update function name to avoid CString reference and adds assertion
* Update server/channels/utils/textgeneration.go
Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
* Extends the charset
---------
Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
* Make server.prepare idempotent, don't cleanup containers on server.start
* Implement rolling upgrade E2E tests
* Apply Akis' suggestions from code review
* Apply Saturn's suggestions from review
* Communicate RollingRelease on GHA and test automation results channel
* Implement E2E test case versioning for rolling release tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Akis Maziotis <akis.maziotis@mattermost.com>
* [MM-59911] Force individual users to receive the `user_added` and `group_added` events instead of relying on the channel membership
* Fix redundant JSON serializing
* Remove makeGetPostIdsAroundPost and makeGetPostsAroundPost
* Remove formatPostInChannel and the one place it is unnecessarily used
* Remove makeGetPostsInChannel
* Update comment for getPostsInCurrentChannel
* Change addUserIdsForStatusAndProfileFetchingPoll to only ever receive arrays of user IDs
* Remove bufferCounter in favour of measuring array length
* Split addUserIdsForStatusAndProfileFetchingPoll into two separate actions
* Slightly simplify getPendingStatusesById
* Add DataLoaderInterval and use in actions/status_profile_polling
* Add tests for IntervalDataLoader
* Start adding DelayedDataLoader
* Updated DelayedDataLoader to split requested data into batches and made addIdsToLoad not return a promise by default
* Modify getMissingProfilesForIds to use a DataLoader and attach DataLoaders to the store
* Add tests for getMissingProfilesByIds loading statuses
* Revert change that defined getMissingProfilesByIds in a closure
* Change getMissingProfilesByUsernames to also use a DelayedDataLoader and add tests
* Pass extra argument into mocked version of Thunk
* Rename DataLoader.addIdsToLoad to DataLoader.queueForLoading
* Rename things and address feedback
* [MM-58492] Remove subsequent check for team permissions on open channels
* Removed extra check for open channel for webhooks as well
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Cleanup post embed for WebSocket payload
* Removing post embeds in create post API
* Fixed a nil check:
* Removed a now-irrelavent test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Refactored channel saving logic
The code for saving channels has been refactored handling different database drivers. The query string is now dynamically generated based on the driver in use. Additionally, error handling has been improved to account for cases where no rows are affected by the insert operation. Because a conflict should be detected due to the complex flow under the call of the function.
* Refactor variable name and error handling in channel store
The variable 'q' has been renamed to 'insert' for better readability. Error handling after executing the insert statement has been improved by checking for errors immediately after execution, rather than waiting until rows affected are checked. This provides a more immediate response to potential issues during the insert operation.
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Add isPostFlagged selector
* Remove unused code for actions_menu preferences
* Improve types of Preference and getPreference
* MM-58111 Change makeGetCategory to take category name once
* Use shouldShowJoinLeaveMessages everywhere
* Change makeGetCategory to better memoize its result
* Fix test that needs EnableJoinLeaveMessageByDefault to be set
* Remove more references to action_menu preferences
Overall, there is no bug here. But opportunities for
improvement.
- Used the maps.Clone function.
- Handled the error while writing to the network.
https://mattermost.atlassian.net/browse/MM-59283
```release-note
NONE
```
* Remove profile__icon onHover style in status__dropdown.scss
* Remove profile__icon class in status__dropdown.tsx for AccountOutlineIcon
* Update status_dropdown snapshot test
* Remove trailing space in status_dropdown snapshot test for AccountOutlineIcon
---------
Co-authored-by: Mattermost Build <build@mattermost.com>