Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global header feature flag default value #18397

Merged
merged 1 commit into from Sep 27, 2021

Conversation

michelengelen
Copy link
Contributor

Summary

Sets the default value for the global header feature flag to true until we are ready to remove the feature flag completely. This should be possible once #8740 is merged. It depends on another PR to be merged beforehand, that is already up and in review from @deanwhillier: #8862

Ticket Link

no ticket was created for this

Release Note

NONE

@michelengelen michelengelen added the 2: Dev Review Requires review by a developer label Sep 16, 2021
@michelengelen michelengelen self-assigned this Sep 16, 2021
@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 16, 2021
@amyblais
Copy link
Member

Suggest submitting this only to the release-6.0 branch for now.

Later we can cherry-pick this to the master branch as well if the feature flag removal PRs don't make it to 6.0.

@amyblais amyblais added this to the v6.0.0 milestone Sep 16, 2021
@michelengelen michelengelen changed the base branch from master to release-6.0 September 16, 2021 13:03
@michelengelen
Copy link
Contributor Author

WOW ... that does not work @amyblais ... I would need to make that change directly on the release branch! :D

@michelengelen michelengelen changed the base branch from release-6.0 to master September 16, 2021 13:05
@amyblais amyblais added the Do Not Merge Should not be merged until this label is removed label Sep 16, 2021
@amyblais amyblais removed their request for review September 16, 2021 13:12
@amyblais amyblais added 4: Reviews Complete All reviewers have approved the pull request and removed Do Not Merge Should not be merged until this label is removed 2: Dev Review Requires review by a developer labels Sep 20, 2021
@amyblais
Copy link
Member

@michelengelen This can be merged. (Doesn't need cherry-picking)

@michelengelen michelengelen merged commit cce0fdf into master Sep 27, 2021
@michelengelen michelengelen deleted the feature/global-header-feature-flag-default branch September 27, 2021 12:56
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Sep 27, 2021
isacikgoz added a commit that referenced this pull request Nov 2, 2021
…18916)

* [MM-37898] Exclude bots from initial user store emptiness check (#18139)

* Exclude bots from initial user store emptiness check

* Add test

* Translations update from Weblate (#18143)

* Translated using Weblate (German)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Bulgarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

* Switch to mysql/mysql-server docker image for ARM64 support. (#18137)

* Use DB native JSON operations for Delete post (#18122)

* Use DB native JSON operations for Delete post

https://community-daily.mattermost.com/plugins/focalboard/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=cb23f737-89c3-4e19-861e-2466c0a16205

```release-note
NONE
```

* move to adapters

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37726] - Self-managed: Update email template to new branding - Invitation email (#18136)

* [MM-37726] - Self-managed: Update email template to new branding - Invitation email

* build

* feedback impl

* feedback impl

* feedback impl

* fix template

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-18391] Removing convert channel endpoint (#18015)

* removing convert endpoint

* fixing translations

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>

* [MM-37772] Idiomatic naming (URL, URI, API) (#18128)

* s/Url/URL/g & s/Uri/URI/g

* s/Api/API/g

* [MM-29217] Remove Posts.ParentId (#17923)

* Modified updateUserNotifyProps to directly update the field (#18097)

* Modified updateUserNotifyProps to directly update the field

The method was only being used during import and it unnecessarily
made multiple queries to the DB.

Changed to a separate query that just updated the props field.

https://community-daily.mattermost.com/plugins/focalboard/workspace/zyoahc9uapdn3xdptac6jb69ic?id=285b80a3-257d-41f6-8cf4-ed80ca9d92e5&v=495cdb4d-c13a-4992-8eb9-80cfee2819a4&c=e4f9a891-85d6-4886-8590-1e327f7f8b8f

```release-note
NONE
```

* invalidating cache

```release-note
NONE
```

* [MM-28985] Remove pointers to slice (part 1) (#18034)

* Remove pointers to slice (part 1)

* Remove use of pointers to slice from model package (#18045)

* Fix after merge

* MM-36764 mlog refactor (#18118)

Refactor mlog
- simplify mlog by removing redundant code
- remove Zap dependency
- update unit test helpers
- update logging config
- update auditing

* [MM-37846] Fix payload for post deleted event (#18131)

* Fix payload for post deleted event

* Add test

* Replaced all instances of "zz" + model.NewId() with NewTestId()(#18194) (#18196)

Automatic Merge

* fix: replace zz+model.NewId with NewTestId (#18197)

Automatic Merge

* Fix bad merge (#18201)

* MM-38004 fix racy unit test (#18189)

* fix racy unit test
* check for nil err
* fix stringer and namederr as well

* prepackage v1.16.1 (#18155)

* [MM-37727] - Self-managed: Update email template to new branding - Mention (#18134)

* [MM-37727] - Self-managed: Update email template to new branding - Mention

* fix lint

* truncate long channel names

* change rgba to rgb

* feedback impl

* adjust character truncation length

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Change inbucket default port from 10080 to 9001 (#18145)

* Bump max allowed file uploads per post (#17948)

* [MM-36445] Changing elastic search docker version (#18117)

* changing elastic docker version for testing

* fixing elastic issue

* temp dockerfile

* test

* removing command

* fixing dockerfile

* adding 7.0.0

* using elasticsearch 7

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>

* [MM-37726] -  Self-managed: Update email template to new branding - Invitation email (#18200)

* [MM-37726] -  Self-managed: Update email template to new branding - Invitation email

* fix subtitle color

* fix other template subtitle colors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* MM-38016 Fix racy unit test (TestService_AddTopicListener) (#18207)

* remove CreateTestLogger API 
* add missing mockServer.Shutdown

* MM-36448: Removes legacy CLI commands. (#17995)

* MM-36448: Removes legacy CLI commands.

* MM-26448: Update translations.

* MM-36448: Fixes some lint errors.

* MM-36448: Conflict resolution error fix. Lint fixes.

* MM-36448: Removes some more commands.

* MM-36448: Removes unused functions.

* MM-36448: Re-adds config command.

* MM-36448: Re-adds func for use by config.

* MM-36448: Moved structs back.

* MM-36488: Re-adds version.

* MM-36448: Re-added some commands.

* MM-36448: Fix tests.

* MM-36448: Removed unused func.

* MM-36448: Removes test.

* MM-36448: Removes uses of 'config set'.

* MM-36448: Moves some test structs.

* MM-36448: Removes the logs command.

* MM-36448: Re-deleted file after bad merge.

* MM-36448: Deleted test files again.

* MM-36448: Re-delete files.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-23279] Idiomatic naming (IP) (#18152)

* Bring back jobserver command (#18220)

* [MM-37682] Expose SiteURL to non-authenticated sessions (#18146)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* MM-36234,MM-37030,MM-37031: CRT, desktop thread notifications (#18088)

* CRT: desktop thread notifications

* Fixes go lint

* Adds default for desktop CRT notifications

* Adds email and push notifications for CRT threads

Adds user ids of thread followers with CRT to crtMentions so they will get
notified appropriately.

* Minor change

* Refactor a bit

CRTMentions.addMention had a bug on the return and de-duplication.
This commit fixes duplicate notifications by looking up if the user is to be
notified on CRT on both email and push notifications.

* Minor refactor

* Changes according to review comments

- Fixes adding to followers a user that had explicitly unfollowed a
  thread.
- Simplified send email according to email_threads option
- Send mentions and followers in separate arrays via the websocket
- Fixes push notifications message for push_threads

* Adds a comment on a buggy use case

* Updates comment to correct ticket link

* Fixes when user notifications is set to all

There was a bug where if user had set notifications to all
then they would receive desktop notifications even for non following threads.

A similar bug existed in push notifications, where if a user has set it
to all the threads setting would still be considered.

This commit fixes that by adding users to notificationsForCRT
StringArray when they have the non thread setting to 'all'.

* Fixes notifications to users unfollowing threads

Users which had previously explicitly unfollowed a thread
should not receive notifications about those threads.

* Update store mocks

* Fixes push notifications for CRT

Push notification about replies for CRT users should have a title of
"Reply to Thread".

CRT users with global user setting to 'UserNotifyAll' should not get
notifications for unfollowed threads.

This commit fixes those issues.

* Fixes i18n error

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [GH-18195] Remove all instances of zz + model.NewId() in storetest/us… (#18205)

Automatic Merge

* [MM-37731] - Self-managed: Update email template to new branding - Invitation Guests (#18222)

* Fixes race condition in notification.go (#18226)

* Fixes race condition in notification.go

Appending is not thread safe, this commit makes followers a map
so we can add new followers from autofollow, and then adds those again
to followers.

* Fixes race condition

* Combine alterations on Posts table (#18210)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix racy test TestViewChannelCollapsedThreadsTurnedOff (#18233)

The followers slice was being read before all goroutines
finished. We fix this by waiting till all goroutines
are done before reading from the slice.

```release-note
NONE
```

* Prepare support for sqlx (#18133)

* Prepare support for sqlx

Just setting up some basic skeleton to start
replacing gorp queries with sqlx.

There is still an issue with efficiently writing
cross-platform named queries, because :FieldName
needs to be :fieldname for Postgres.

The positional params can be rebound depending on
driver name. But named queries can't from my
investigation. Will look into this.

```release-note
NONE
```

* Refactor mapper

```release-note
NONE
```

* Forgot to init slice

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37725] - Self-managed: Update email template to new branding - Password Reset (#18135)

* [MM-37725] - Self-managed: Update email template to new branding - Password Reset

* feedback impl

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-36387] Address db performance audit items (#18078)

* Update channel member notify props to use native JSON (#18114)

* Update channel member notify props to use native JSON

Created a new store method that patches the notify props field.

https://community-daily.mattermost.com/plugins/focalboard/workspace/zyoahc9uapdn3xdptac6jb69ic?id=285b80a3-257d-41f6-8cf4-ed80ca9d92e5&v=495cdb4d-c13a-4992-8eb9-80cfee2819a4&c=91d08676-4a0e-4f02-8dce-d24d4fc56449

```release-note
NONE
```

* cleanup

```release-note
NONE
```

* forgot to commit

```release-note
NONE
```

* Fix edge case

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* fix incorrect order

```release-note
NONE
```

* Address review comments

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Translations update from Weblate (#18239)

* Translated using Weblate (Dutch)

Currently translated at 99.8% (2292 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 99.9% (2291 of 2292 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 99.9% (2300 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 100.0% (2295 of 2295 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2295 of 2295 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2295 of 2295 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

Translated using Weblate (English (Australia))

Currently translated at 100.0% (2292 of 2292 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2296 of 2296 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>

* Update latest version to 5.38.1 (#18243)

Automatic Merge

* Fix for test-data make target (#18229)

* Fix for the test-data command.

* Sleep and warn about needing local mode enabled.

* Improved server start synchro.

* Issue #18191 and #18193 fixed (#18217)

Automatic Merge

* move users service to app directory (#18257)

* Add plugin websocket hooks (#18151)

* Add plugin websocket hooks

* Improve sending message mechanism and filter out of the router plugin specific messages

* Return and manage error if the request clone fails

* Wording change to avoid repetition

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Remove all instances of "zz" + model.NewId() in storetest/channel_store.go (#18199)

* Update MM version/sqlstore to version 6.0.0 (#18247)

Automatic Merge

* [MM-37494] Check for license SKU when preparing marketplace requests (#18031)

* check for license SKU when preparing marketplace requests

* rename method to HasEnterpriseMarketplacePlugins

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix flaky TestRequestTrialLicense test (#18259)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads (#18253)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads

* check if defaults are valid

* [MM-38082] Add local-mode handler for config reload endpoint (#18252)

* Add local-mode handler for config reload endpoint

* Remove redundant method

* Mm 37462 add channel split (#18254)

* add AddChannelButton feature

* Skip UserService user creation test in short-testing mode (#17907)

* Don't give up import when importing an attachment fails (#18084)

* MM-37372 Do not autofollow threads started by webhooks/bots for user who created them (#18276)

* Do not autofollow threads started by webhooks/bots for user who created them

* Add test

* security: add dependency track configuration (#18285)

* Bump go.mod and docker go version to 1.16 (#18280)

* Bump go.mod go version to 1.16

* Bump docker build go version to 1.16.7

* Added a sqlXPassThrough layer (#18238)

* Added a sqlXPassThrough layer

This layer embeds the original sqlx object and wraps some
key methods to avoid some boilerplate.

- Add timeout to all methods from the timeout in settings.
- Added trace functionality.
- Added auto-rebind capabilities so that each store method
doesn't need to call rebind every time.
- Added auto-lowering of query string to support NamedExec
for both MySQL and Postgres

All methods are not wrapped as all are likely not to be called
from our code. As and when they are called, support will be added.

```release-note
NONE
```

* fix lint issues

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* incorporate suggestions

```release-note
NONE
```

* Translations update from Weblate (#18303)

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: wget <william@gathoye.be>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>

* Added Inline Latex support (#18219)

* Added inline latex option to config

* Inline latex setting now defaults to true

* Added inline latex setting to telemetry

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* MM-38132: Improve Auto Responder logic (#18264)

We properly truncate the date part from the createAt time.

The SQL query is improved now to directly return the bool.

Fixed the test to properly test the feature.

https://mattermost.atlassian.net/browse/MM-38132

```release-note
NONE
```

* update add channel button default to by_team_name (#18281)

* MM-35017: order and inclusion of participants (#18235)

* MM-35017: order and inclusion of participants

From now on root poster is not considered a thread participant,
only repliers are participants.

Ordering: A second reply to the thread from the same user should place
the user last at the participants list.

* Fixes shadow

* Fixes tests

* Order By CreateAt for participants of old threads

* Removes unnecessary check on root id

* Removes GetParticipantProfilesByIds it's not needed

At first GetParticipantProfilesByIds was created because GetProfileByIds
gets users by order of username.
This was not needed, we can order by user ids in Go.

This commit removes GetParticipantProfilesByIds and replaces it by
GetProfileByIds as it was done before.

* Fixes participants order for pre CRT threads

Older threads (before CRT) are being converted to CRT threads upon
reply.
This commit considers the order of participants to be inserted to
the new thread.

* Adds tests for thread participants

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37621] Update db schema validation scripts for 6.0 (#18223)

* Fix migration scripts

* Update schema validation scripts

* removes the global header feature flag and default value (#18304)

* [MM-36792] limit number of threads returned from SQL store (#18260)

Summary
Limit the number of threads returned in a single SQL store call by using the per_page query param instead of pageSize. Our param handling code automatically limits the number of records that can be requested. To support older mobile clients we continue to support the pageSize param until version 6.0 of the server is the minimum supported server version on mobile. 

Related PRs:

[MM-36792] Consistent query param names mattermost-webapp#8700
[MM-36792] Consistent query param names mattermost-mobile#5643

Ticket Link
https://mattermost.atlassian.net/browse/MM-36792

* Update schemas to include new indexes (#18313)

* Update schemas to include new indexes

* Increase local usability of gitlab scripts. (#18314)

* Increase local usability of gitlab scripts.

* Fix loading/saving SQL dumps

* Add logging to schema tests.

* Fix adding logs dir.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>

* [MM-24714]  Render markdown in email notifications (#18043)

Automatic Merge

* cleanup some commented out code (#18318)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-22051] Remove To/From JSON (#18070)

* Posts

* Add missing translation

* Fix internal store marshaling

* [MM-22051] Remove To/From JSON (Channels) (#18116)

* Channels

* Channel members

* ChannelSearch

* Channel categories, list, sidebar, stats, view

* Fix conversions

* [MM-22051] Remove To/From JSON (Users) (#18121)

* User related structs

* Fix return

* Team related structures (#18127)

* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130)

* Status

* Bot

* Reaction

* Thread

* FileInfo

* Some fixes

* Translations update from Weblate (#18143)

* Translated using Weblate (German)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Bulgarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

* [MM-22051] Remove To/From JSON methods from model (#18138)

* Scheme

* Role

* Session

* Config

* Status

* Fix logic

* Emoji

* GuestsInvite

* Group

* Command

* ClusterInfo

* License

* Job

* System

* Plugin

* Command2

* IncomingWebhook

* OutgoingWebhook

* Fix tests

* Update traslation

* Some fixes

* Add missing return

* Simplify

* Make Config.ToJSONFiltered() return []byte

* Make Busy.ToJSON() return []byte

* Include error in log

* Split logic

* [MM-22051] Remove To/From JSON (final) (#18150)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* [MM-23280] Fix linting for ToJSON/FromJSON (#18153)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* Fix linting for ToJSON/FromJSON

* Fix conversions

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Revert "removes the global header feature flag and default value (#18304)" (#18324)

This reverts commit 9fb8de731822a8278e54490ad987eba61ee8ae6b.

* Fix test schema docker-compose exec exit problem  (#18327)

* Fix schema tests exiting early by replacing docker-compose exec with docker exec. 

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Use new mattermost-govet (#18329)

```release-note
NONE
```

* Update en.json (#18305)

Automatic Merge

* Migrating bot store to use sqlx (#18300)

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=5da060fd-8fbc-449d-8219-c73a9dd0bd7c

```release-note
NONE
```

* [MM-38321] Fix possible panics during license validation (#18333)

* Fix possible panics during license validation

* Return error if non 2xx code is returned by trial request server

* Gh 13908 fix bot missing username error (#17854)

Automatic Merge

* Fix trap (#18338)

* Fix trap

* Fix trap by removing trap.

* Translations update from Weblate (#18344)

* Translated using Weblate (Russian)

Currently translated at 96.7% (2223 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ru/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.3% (2170 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: Vladislav Moiseev <v.moiseev94@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* Fix stopping mattermost server (#18337)

* Adjust values waiting for webapp. (#18345)

* Check curl version

* Add todo for future curl version. Fix the command.

* Implement proper looping so npm build case could be executed. And test it.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Fix flaky TestCreateDefaultMemberships (#18330)

* Fix possible race (#18328)

* remove feature flag (#18350)

* MM-38093: updates notifications copy on CRT replies (#18332)

MM-38093: updates notifications copy on CRT replies

Updates texts form push and email notifications when the user has CRT "on"
and the post is a reply to a thread.

Email batches text aware of CRT threads

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update Node and NPM minimum versions (#18367)

* Translations update from Weblate (#18369)

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 99.7% (2300 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.3% (2290 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2302 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>

* Bump Post.Props size limits (#18370)

* Migrating OAuthStore to sqlx (#18302)

* Migrating OAuthStore to sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=71efa7c4-53be-4732-87cc-d53726d2cd53

```release-note
NONE
```

* Fixing some broken tests

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix plugin logging missing context fields

Fix an issue where context fields logged by server on behalf of plugins didn't contain correct name/value pairs:
- bump Logr version to add key/value methods to sugar logger
- expose factory args when configuring logging with custom target types (needed for FocalBoard to create log target adapter that converts typed fields into slices of interface{} as per plugin logging API)

* add prewritten message A/B test feature flag (#18372)

* Disable admin support status job on server startup (#18341)

* Migrating Emoji store to use sqlx (#18301)

* Migrating Emoji store to use sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=646cee9a-219c-49f3-8e0b-6ec2cff4deba

```release-note
NONE
```

* Incorporate review suggestions

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-36444] Manage config deprecations for 6.0 (#18035)

* removing deprecated stuff

* removing deprecations and marking others for deprecations

* removing some of the configs

* partially remove ExperimentalChannelOrganization

* fixing merge issues

* moving default permissions to defaultroles function

* removing experimentaltownsquare

* removing old tests and remove legacysidebar config

* fixing test

* removing log

* removing unused variables

* MM-36444: Fix for renamed functions.

* MM-36444: go mod tidy and go mod vendor.

* MM-36444: Vendored go modules.

* MM-36444: Removes UseExperimentalGossip config field from model.

* Fix vendors

* fixing test

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Set BuildDate compile flag to dev during development (#18383)

* Set BuildDate compile flag to dev during development

* Addressing review comments

* MM-37721: Add prop for post preview before saving record. (#18361)

* MM-37721: Add prop for post preview before saving record.

* MM-37721: Test fix.

* MM-37721: Adds test.

* MM-37721: Fixes vet.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email (#18221)

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email

* batch email fixes

* simplify email title

* More fixes

* fix tests

* fix group message name on card

* fix bracket issue

* style the count

* account for  merged changes

* change truncating rule

* Update to bleve v2 and to use the scorch index (#18266)

Automatic Merge

* MM-37896: thread recency when updating a post (#18363)

When a post is edited we should not update the thread recency
(LastReplyAt).

* Update to use new plugin ID for playbooks. (#18392)

* add feature flag (#18404)

* MM-38081: Fix for disappearing permalink previews (#18400)

* MM-38081: Fix for disappearing previews.

* MM-38081: Update method signature in tests.

* MM-38081: Adds test replicating bug.

* Migrate from gorp to sqlx in store/sqlstore/audit_store.go (#18409)

* MM-38635 - Debug statements for prepareImage errors on community-daily (#18416)

* add debug info to generateMiniPreview error

* linting

* simplify

* Update app/file.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* add channel_id and creator_id to the log statement

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Revert import command deprecation (#18413)

Automatic Merge

* MM-38611 getSharedChannels: only return channels user is member of (#18417)

* getSharedChannels: only return channels user is member of

* Last 4 credit card digits as a string (#17996)

* [MM-36603] - Text is cut-off on the bottom of the 14-day trial 3 day to end of trial email notification (#18421)

* feedback impl

* add test

* Translations update from Weblate (#18420)

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Adolfo García Veytia <adolfo.garcia@mattermost.com>

* [MM-38375] Fix processing bulk import with attachments (#18352)

* Fix improper attachments in replies

* Fix import data path

* Improve errors

* Fix importing attachments directly from zip file

* Add some test cases to cover error paths

* Add debug log for nil referencedPost (#18437)

* add debug log for nil post

* add post id for context

* log other vars that may be nil

* change from Warn to Debug

* MM-38712: Flush logs while exiting from store upgrade (#18438)

Our store upgrade methods used mlog.Critical and then slept
for a second and triggered os.Exit.

First of all, with the new mlog refactor Critical wasn't a standard
log level so it was never to be logged.

And secondly, this completely missed the fact that there already
existed an API method Fatal which did exactly this.

We mark the Critical API as deprecated, and use Fatal for all
occurences.

The choice should be between either to use Error or Fatal.

While here, we also remove the non-standard exit codes which
just confused things further while debugging.

https://mattermost.atlassian.net/browse/MM-38712

```release-note
NONE
```

* MM-38657 - Sentry crash: Fix nil dereference when post not found (#18440)

* Revert "Add debug log for nil referencedPost (#18437)"

This reverts commit e575315275481f5f339455d1b9f40c29667c842b.

* Ignores post not found errors at a higher level

And adds test

```release-note
NONE
```

* [MM-38216] Add API endpoint and adapt search to allow multi-team search (#18371)

* Add API endpoint and adapt search to allow multi-team search

* Refactor handler, refactor sql query to use squirrel, rename app and store functions and add tests

* Fix lint

* Fix search engines and remove unneeded comments

* Fix test

* Remove user from channel after test

* Update base container image from alpine 3.12 to 3.14 (#18450)

* update default mm package to 5.39.0

* update base container image from alpine 3.12 to 3.14

* MM-38774 - partial fix for: Community running out of memory (#18445)

* prevent invalid images from entering generateMiniPreview in the future

* fixing err, err2, imgErr

* linting

* load actual pngs and gifs in tests

* consistent style

* register PreviewPost for RPC connections (#18452)

* Exclude sending file metadata to plugin hooks (#18454)

* Exclude sending file metadata to plugin hooks

A FileInfo object contained a MiniPreview which is
a slice of bytes. This can be particularly costly
while marshalling to plugin hooks.

We avoid this by refactoring the Embeds and Images
population to a separate method and calling that
to prevent posts from getting updated.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=9c0b5413-5401-4ef2-83d5-b9f756585bbc

```release-note
NONE
```

* refactor to separate method

```release-note
NONE
```

* sets global header feature flag to true until the webapp codebase is ready (#18397)

* Translations update from Weblate (#18467)

* Translated using Weblate (German)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.5% (2295 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Polish)

Currently translated at 74.0% (1708 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (French)

Currently translated at 95.2% (2196 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Translated using Weblate (French)

Currently translated at 94.0% (2169 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* [MM-38579] Removing some town square permissions stuff (#18464)

* removing some town square permissions stuff

* fixing error

* adding back in channel leave check

* removing tests

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>

* Pre-package Playbooks 1.20.0 (#18477)

Automatic Merge

* [MM-36786] Check channel permissions before thread follow/unfollow (#18460)

* Only consider flagged posts that are on channels you are member of (#18380)

* Only consider flagged posts that are on channels you are member of

* Fix and add tests

* [MM-36472] Fix inconsistencies in Roles columns (#18390)

* Fix inconsistencies in Roles columns

* Add new migrations

* build: set 600 permission to config.json when packagin the app (#18490)

* docker/build: push image to the testing repository (#18488)

* Execute update posts query first (#18524)

* Translations update from Weblate (#18530)

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.3% (1828 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 74.5% (1718 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Swedish)

Currently translated at 99.6% (2303 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.2% (1831 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 99.4% (2297 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 95.3% (2202 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (French)

Currently translated at 95.0% (2196 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Co-authored-by: Markus Hermann <markus.hermann@uni-marburg.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Aleksander Chromik <achromik@gmail.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-…
isacikgoz added a commit that referenced this pull request Nov 16, 2021
…19000)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads (#18253)

* MM-37787: ThreadAutoFollow must be true to enable CollapsedThreads

* check if defaults are valid

* [MM-38082] Add local-mode handler for config reload endpoint (#18252)

* Add local-mode handler for config reload endpoint

* Remove redundant method

* Mm 37462 add channel split (#18254)

* add AddChannelButton feature

* Skip UserService user creation test in short-testing mode (#17907)

* Don't give up import when importing an attachment fails (#18084)

* MM-37372 Do not autofollow threads started by webhooks/bots for user who created them (#18276)

* Do not autofollow threads started by webhooks/bots for user who created them

* Add test

* security: add dependency track configuration (#18285)

* Bump go.mod and docker go version to 1.16 (#18280)

* Bump go.mod go version to 1.16

* Bump docker build go version to 1.16.7

* Added a sqlXPassThrough layer (#18238)

* Added a sqlXPassThrough layer

This layer embeds the original sqlx object and wraps some
key methods to avoid some boilerplate.

- Add timeout to all methods from the timeout in settings.
- Added trace functionality.
- Added auto-rebind capabilities so that each store method
doesn't need to call rebind every time.
- Added auto-lowering of query string to support NamedExec
for both MySQL and Postgres

All methods are not wrapped as all are likely not to be called
from our code. As and when they are called, support will be added.

```release-note
NONE
```

* fix lint issues

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* incorporate suggestions

```release-note
NONE
```

* Translations update from Weblate (#18303)

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2297 of 2297 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (French)

Currently translated at 94.6% (2174 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: wget <william@gathoye.be>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>

* Added Inline Latex support (#18219)

* Added inline latex option to config

* Inline latex setting now defaults to true

* Added inline latex setting to telemetry

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* MM-38132: Improve Auto Responder logic (#18264)

We properly truncate the date part from the createAt time.

The SQL query is improved now to directly return the bool.

Fixed the test to properly test the feature.

https://mattermost.atlassian.net/browse/MM-38132

```release-note
NONE
```

* update add channel button default to by_team_name (#18281)

* MM-35017: order and inclusion of participants (#18235)

* MM-35017: order and inclusion of participants

From now on root poster is not considered a thread participant,
only repliers are participants.

Ordering: A second reply to the thread from the same user should place
the user last at the participants list.

* Fixes shadow

* Fixes tests

* Order By CreateAt for participants of old threads

* Removes unnecessary check on root id

* Removes GetParticipantProfilesByIds it's not needed

At first GetParticipantProfilesByIds was created because GetProfileByIds
gets users by order of username.
This was not needed, we can order by user ids in Go.

This commit removes GetParticipantProfilesByIds and replaces it by
GetProfileByIds as it was done before.

* Fixes participants order for pre CRT threads

Older threads (before CRT) are being converted to CRT threads upon
reply.
This commit considers the order of participants to be inserted to
the new thread.

* Adds tests for thread participants

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37621] Update db schema validation scripts for 6.0 (#18223)

* Fix migration scripts

* Update schema validation scripts

* removes the global header feature flag and default value (#18304)

* [MM-36792] limit number of threads returned from SQL store (#18260)

Summary
Limit the number of threads returned in a single SQL store call by using the per_page query param instead of pageSize. Our param handling code automatically limits the number of records that can be requested. To support older mobile clients we continue to support the pageSize param until version 6.0 of the server is the minimum supported server version on mobile. 

Related PRs:

[MM-36792] Consistent query param names mattermost-webapp#8700
[MM-36792] Consistent query param names mattermost-mobile#5643

Ticket Link
https://mattermost.atlassian.net/browse/MM-36792

* Update schemas to include new indexes (#18313)

* Update schemas to include new indexes

* Increase local usability of gitlab scripts. (#18314)

* Increase local usability of gitlab scripts.

* Fix loading/saving SQL dumps

* Add logging to schema tests.

* Fix adding logs dir.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>

* [MM-24714]  Render markdown in email notifications (#18043)

Automatic Merge

* cleanup some commented out code (#18318)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-22051] Remove To/From JSON (#18070)

* Posts

* Add missing translation

* Fix internal store marshaling

* [MM-22051] Remove To/From JSON (Channels) (#18116)

* Channels

* Channel members

* ChannelSearch

* Channel categories, list, sidebar, stats, view

* Fix conversions

* [MM-22051] Remove To/From JSON (Users) (#18121)

* User related structs

* Fix return

* Team related structures (#18127)

* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130)

* Status

* Bot

* Reaction

* Thread

* FileInfo

* Some fixes

* Translations update from Weblate (#18143)

* Translated using Weblate (German)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2309 of 2309 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Bulgarian)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2301 of 2301 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>

* [MM-22051] Remove To/From JSON methods from model (#18138)

* Scheme

* Role

* Session

* Config

* Status

* Fix logic

* Emoji

* GuestsInvite

* Group

* Command

* ClusterInfo

* License

* Job

* System

* Plugin

* Command2

* IncomingWebhook

* OutgoingWebhook

* Fix tests

* Update traslation

* Some fixes

* Add missing return

* Simplify

* Make Config.ToJSONFiltered() return []byte

* Make Busy.ToJSON() return []byte

* Include error in log

* Split logic

* [MM-22051] Remove To/From JSON (final) (#18150)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* [MM-23280] Fix linting for ToJSON/FromJSON (#18153)

* SwitchRequest

* PluginEventData

* Permalink

* PushNotification

* SuggestCommand

* PluginsResponse

* WebSocketMessage

* RemoteCluster

* SharedChannel

* PluginStatuses

* InitialLoad

* ClusterDiscovery

* ClusterStats

* MfaSecret

* GroupSyncable

* SAML

* WebSocketRequest

* TypingRequest

* SecurityBulletin

* OAuthApp

* IntegrationAction

* DataRetention

* Preference

* FileInfoList

* Compliance

* Preferences

* FileInfoSearchResults

* TermsOfService

* InstallMarketplacePluginRequest

* GitLabUser

* UploadSessions

* Remove unused helpers

* Fix tests

* Fix linting for ToJSON/FromJSON

* Fix conversions

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Revert "removes the global header feature flag and default value (#18304)" (#18324)

This reverts commit 9fb8de731822a8278e54490ad987eba61ee8ae6b.

* Fix test schema docker-compose exec exit problem  (#18327)

* Fix schema tests exiting early by replacing docker-compose exec with docker exec. 

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Use new mattermost-govet (#18329)

```release-note
NONE
```

* Update en.json (#18305)

Automatic Merge

* Migrating bot store to use sqlx (#18300)

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=5da060fd-8fbc-449d-8219-c73a9dd0bd7c

```release-note
NONE
```

* [MM-38321] Fix possible panics during license validation (#18333)

* Fix possible panics during license validation

* Return error if non 2xx code is returned by trial request server

* Gh 13908 fix bot missing username error (#17854)

Automatic Merge

* Fix trap (#18338)

* Fix trap

* Fix trap by removing trap.

* Translations update from Weblate (#18344)

* Translated using Weblate (Russian)

Currently translated at 96.7% (2223 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ru/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 100.0% (2298 of 2298 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Translated using Weblate (German)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 99.8% (2297 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

Translated using Weblate (English (Australia))

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (French)

Currently translated at 94.3% (2170 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: Vladislav Moiseev <v.moiseev94@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* Fix stopping mattermost server (#18337)

* Adjust values waiting for webapp. (#18345)

* Check curl version

* Add todo for future curl version. Fix the command.

* Implement proper looping so npm build case could be executed. And test it.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Fix flaky TestCreateDefaultMemberships (#18330)

* Fix possible race (#18328)

* remove feature flag (#18350)

* MM-38093: updates notifications copy on CRT replies (#18332)

MM-38093: updates notifications copy on CRT replies

Updates texts form push and email notifications when the user has CRT "on"
and the post is a reply to a thread.

Email batches text aware of CRT threads

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update Node and NPM minimum versions (#18367)

* Translations update from Weblate (#18369)

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2300 of 2300 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

Translated using Weblate (Hungarian)

Currently translated at 99.7% (2300 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 99.3% (2290 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2302 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>

* Bump Post.Props size limits (#18370)

* Migrating OAuthStore to sqlx (#18302)

* Migrating OAuthStore to sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=71efa7c4-53be-4732-87cc-d53726d2cd53

```release-note
NONE
```

* Fixing some broken tests

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix plugin logging missing context fields

Fix an issue where context fields logged by server on behalf of plugins didn't contain correct name/value pairs:
- bump Logr version to add key/value methods to sugar logger
- expose factory args when configuring logging with custom target types (needed for FocalBoard to create log target adapter that converts typed fields into slices of interface{} as per plugin logging API)

* add prewritten message A/B test feature flag (#18372)

* Disable admin support status job on server startup (#18341)

* Migrating Emoji store to use sqlx (#18301)

* Migrating Emoji store to use sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=646cee9a-219c-49f3-8e0b-6ec2cff4deba

```release-note
NONE
```

* Incorporate review suggestions

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-36444] Manage config deprecations for 6.0 (#18035)

* removing deprecated stuff

* removing deprecations and marking others for deprecations

* removing some of the configs

* partially remove ExperimentalChannelOrganization

* fixing merge issues

* moving default permissions to defaultroles function

* removing experimentaltownsquare

* removing old tests and remove legacysidebar config

* fixing test

* removing log

* removing unused variables

* MM-36444: Fix for renamed functions.

* MM-36444: go mod tidy and go mod vendor.

* MM-36444: Vendored go modules.

* MM-36444: Removes UseExperimentalGossip config field from model.

* Fix vendors

* fixing test

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Set BuildDate compile flag to dev during development (#18383)

* Set BuildDate compile flag to dev during development

* Addressing review comments

* MM-37721: Add prop for post preview before saving record. (#18361)

* MM-37721: Add prop for post preview before saving record.

* MM-37721: Test fix.

* MM-37721: Adds test.

* MM-37721: Fixes vet.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email (#18221)

* [MM-37730] - Self-managed: Update email template to new branding - Batch Email

* batch email fixes

* simplify email title

* More fixes

* fix tests

* fix group message name on card

* fix bracket issue

* style the count

* account for  merged changes

* change truncating rule

* Update to bleve v2 and to use the scorch index (#18266)

Automatic Merge

* MM-37896: thread recency when updating a post (#18363)

When a post is edited we should not update the thread recency
(LastReplyAt).

* Update to use new plugin ID for playbooks. (#18392)

* add feature flag (#18404)

* MM-38081: Fix for disappearing permalink previews (#18400)

* MM-38081: Fix for disappearing previews.

* MM-38081: Update method signature in tests.

* MM-38081: Adds test replicating bug.

* Migrate from gorp to sqlx in store/sqlstore/audit_store.go (#18409)

* MM-38635 - Debug statements for prepareImage errors on community-daily (#18416)

* add debug info to generateMiniPreview error

* linting

* simplify

* Update app/file.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* add channel_id and creator_id to the log statement

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* Revert import command deprecation (#18413)

Automatic Merge

* MM-38611 getSharedChannels: only return channels user is member of (#18417)

* getSharedChannels: only return channels user is member of

* Last 4 credit card digits as a string (#17996)

* [MM-36603] - Text is cut-off on the bottom of the 14-day trial 3 day to end of trial email notification (#18421)

* feedback impl

* add test

* Translations update from Weblate (#18420)

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Translated using Weblate (Dutch)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (German)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2305 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 86.1% (1985 of 2305 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Adolfo García Veytia <adolfo.garcia@mattermost.com>

* [MM-38375] Fix processing bulk import with attachments (#18352)

* Fix improper attachments in replies

* Fix import data path

* Improve errors

* Fix importing attachments directly from zip file

* Add some test cases to cover error paths

* Add debug log for nil referencedPost (#18437)

* add debug log for nil post

* add post id for context

* log other vars that may be nil

* change from Warn to Debug

* MM-38712: Flush logs while exiting from store upgrade (#18438)

Our store upgrade methods used mlog.Critical and then slept
for a second and triggered os.Exit.

First of all, with the new mlog refactor Critical wasn't a standard
log level so it was never to be logged.

And secondly, this completely missed the fact that there already
existed an API method Fatal which did exactly this.

We mark the Critical API as deprecated, and use Fatal for all
occurences.

The choice should be between either to use Error or Fatal.

While here, we also remove the non-standard exit codes which
just confused things further while debugging.

https://mattermost.atlassian.net/browse/MM-38712

```release-note
NONE
```

* MM-38657 - Sentry crash: Fix nil dereference when post not found (#18440)

* Revert "Add debug log for nil referencedPost (#18437)"

This reverts commit e575315275481f5f339455d1b9f40c29667c842b.

* Ignores post not found errors at a higher level

And adds test

```release-note
NONE
```

* [MM-38216] Add API endpoint and adapt search to allow multi-team search (#18371)

* Add API endpoint and adapt search to allow multi-team search

* Refactor handler, refactor sql query to use squirrel, rename app and store functions and add tests

* Fix lint

* Fix search engines and remove unneeded comments

* Fix test

* Remove user from channel after test

* Update base container image from alpine 3.12 to 3.14 (#18450)

* update default mm package to 5.39.0

* update base container image from alpine 3.12 to 3.14

* MM-38774 - partial fix for: Community running out of memory (#18445)

* prevent invalid images from entering generateMiniPreview in the future

* fixing err, err2, imgErr

* linting

* load actual pngs and gifs in tests

* consistent style

* register PreviewPost for RPC connections (#18452)

* Exclude sending file metadata to plugin hooks (#18454)

* Exclude sending file metadata to plugin hooks

A FileInfo object contained a MiniPreview which is
a slice of bytes. This can be particularly costly
while marshalling to plugin hooks.

We avoid this by refactoring the Embeds and Images
population to a separate method and calling that
to prevent posts from getting updated.

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=9c0b5413-5401-4ef2-83d5-b9f756585bbc

```release-note
NONE
```

* refactor to separate method

```release-note
NONE
```

* sets global header feature flag to true until the webapp codebase is ready (#18397)

* Translations update from Weblate (#18467)

* Translated using Weblate (German)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 99.5% (2295 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Polish)

Currently translated at 74.0% (1708 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2306 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (French)

Currently translated at 95.2% (2196 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Translated using Weblate (French)

Currently translated at 94.0% (2169 of 2306 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: aeomin <lin@aeomin.net>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>

* [MM-38579] Removing some town square permissions stuff (#18464)

* removing some town square permissions stuff

* fixing error

* adding back in channel leave check

* removing tests

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>

* Pre-package Playbooks 1.20.0 (#18477)

Automatic Merge

* [MM-36786] Check channel permissions before thread follow/unfollow (#18460)

* Only consider flagged posts that are on channels you are member of (#18380)

* Only consider flagged posts that are on channels you are member of

* Fix and add tests

* [MM-36472] Fix inconsistencies in Roles columns (#18390)

* Fix inconsistencies in Roles columns

* Add new migrations

* build: set 600 permission to config.json when packagin the app (#18490)

* docker/build: push image to the testing repository (#18488)

* Execute update posts query first (#18524)

* Translations update from Weblate (#18530)

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/

* Translated using Weblate (German)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.3% (1828 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 74.5% (1718 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Swedish)

Currently translated at 99.6% (2303 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Translated using Weblate (Swedish)

Currently translated at 100.0% (2303 of 2303 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Polish)

Currently translated at 79.2% (1831 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 99.4% (2297 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

Translated using Weblate (Spanish)

Currently translated at 95.3% (2202 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (French)

Currently translated at 95.0% (2196 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Co-authored-by: Markus Hermann <markus.hermann@uni-marburg.de>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Aleksander Chromik <achromik@gmail.com>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: Nathanaël <contact@nathanaelhoun.fr>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>

* Remove searchEngine from App (#18540)

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=c6753a1c-dbbf-4316-8e4e-c58ebb65d6e0

```release-note
NONE
```

* [GH-15744] Remove direct token store access in api4/user module (#18411)

Automatic Merge

* Translations update from Weblate (#18545)

* Translated using Weblate (Polish)

Currently translated at 83.7% (1935 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (Swedish)

Currently translated at 99.8% (2306 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>

* MM-38805 - fix contact sales link (#18539)

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>

* Pre-package Channel Export plugin v1.0.0 (#18544)

* Migrate from gorp to sqlx in store/sqlstore/command_webhook_store.go (#18517)

* Migrate from gorp to sqlx in store/sqlstore/command_webhook_store.go

* fixing small things

change `CreatedAt` to `CreateAt` and change GetReplicaX().Select to GetReplicaX().Get

Co-authored-by: Saul Pinales <saul021002@gmai.com>

* Pre-package Playbooks v1.20.1 (#18542)

* [MM-39072] - Run make build-templates on latest master (#18541)

* [MM-39072] - Run make build-templates on latest master

* fix guest template failure

* MM-38497: Fix Sentry crash in PostAction.Equals (#18571)

* MM-38497: Fix Sentry crash in PostAction.Equals

We check for nil pointer before moving ahead.

https://mattermost.atlassian.net/browse/MM-38497

```release-note
NONE
```

* Fix lint errors

```release-note
NONE
```

* Update model/integration_action.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* [MM-38437] - Trial ending soon email refers to Cloud Professional (#18546)

* [MM-38437] - Trial ending soon email refers to Cloud Professional

* feedback impl

* add coma

* MM-38624 Migrate ChannelMemberHistoryStore to sqlx (#18496)

Automatic Merge

* Prepackaged boards to 0.9.1 (#18405)

* update prepackaged boards to 0.9.0

* update to 0.9.1

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Turn focalboard plugin on by default (#18132)

* turn focalboard plugin on by default

* cleanup

* update config diff tests to add new default

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Add index on Jobs table (#18244)

From Grafana charts, GetCountbyStatusandType and
GetNewestJobByStatusesAndType were the two top queries.

Overall, a through look into all job methods leads to
the conclusion of 2 indexes - one on CreateAt, another
a compound index of Status+Type. I have just gone ahead
with the compound index for now. Once the job cleaner
is implemented, I want to take a second look to decide
whether to add the second index or not.

Here is the before-after of the queries:

Query 1:
```
explain analyze select count(*) from jobs where status='error' and type='migrations';
                                                         QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=103.42..103.43 rows=1 width=8) (actual time=0.032..0.034 rows=1 loops=1)
   ->  Bitmap Heap Scan on jobs  (cost=4.54..103.42 rows=1 width=0) (actual time=0.027..0.028 rows=0 loops=1)
         Recheck Cond: ((type)::text = 'migrations'::text)
         Filter: ((status)::text = 'error'::text)
         ->  Bitmap Index Scan on idx_jobs_type  (cost=0.00..4.54 rows=34 width=0) (actual time=0.018..0.019 rows=0 loops=1)
               Index Cond: ((type)::text = 'migrations'::text)

explain analyze select count(*) from jobs where status='error' and type='migrations';
                                                         QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------
Aggregate  (cost=8.31..8.32 rows=1 width=8) (actual time=0.079..0.080 rows=1 loops=1)
   ->  Index Only Scan using jobs_multi on jobs  (cost=0.29..8.30 rows=1 width=0) (actual time=0.072..0.073 rows=0 loops=1)
         Index Cond: ((status = 'error'::text) AND (type = 'migrations'::text))
         Heap Fetches: 0

explain analyze select * from jobs where status='error' and type='migrations' order by createat desc limit 1;
```

Query 2:
```
                                                            QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=8.31..8.32 rows=1 width=187) (actual time=0.037..0.039 rows=0 loops=1)
   ->  Sort  (cost=8.31..8.32 rows=1 width=187) (actual time=0.035..0.036 rows=0 loops=1)
         Sort Key: createat DESC
         Sort Method: quicksort  Memory: 25kB
         ->  Index Scan using idx_jobs_type on jobs  (cost=0.29..8.30 rows=1 width=187) (actual time=0.027..0.027 rows=0 loops=1)
               Index Cond: ((type)::text = 'migrations'::text)
               Filter: ((status)::text = 'error'::text)

explain analyze select * from jobs where status='error' and type='migrations' order by createat desc limit 1;
                                                          QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=8.31..8.32 rows=1 width=187) (actual time=0.065..0.067 rows=0 loops=1)
   ->  Sort  (cost=8.31..8.32 rows=1 width=187) (actual time=0.063..0.064 rows=0 loops=1)
         Sort Key: createat DESC
         Sort Method: quicksort  Memory: 25kB
         ->  Index Scan using jobs_multi on jobs  (cost=0.29..8.30 rows=1 width=187) (actual time=0.021..0.022 rows=0 loops=1)
               Index Cond: (((status)::text = 'error'::text) AND ((type)::text = 'migrations'::text))

```

```release-note
NONE
```

* Move admin advisor to separate file (#18606)

```release-note
NONE
```

* MM-37186: Update dependencies (#18604)

* MM-37186: Update dependencies

The split client libraries were excluded from being upgraded.

See: https://github.com/splitio/go-split-commons/issues/56

https://mattermost.atlassian.net/browse/MM-37186

```release-note
NONE
```

* Ignore staticcheck deprecation warnings

```release-note
NONE
```

* Add new CI step for checking email templates (#18570)

* Add new CI step for checking email templates

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=2c1d9628-675f-4eb6-80bb-db9e4d09b8bf

```release-note
NONE
```

* Pre-install

```release-note
NONE
```

* pinning down to 4.9.0

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Cluster Discovery store sqlx migration (#18605)

Automatic Merge

* Allow webapp to request legacy cloud products. (#18528)

* Change internal getProducts to filter on a set of families instead of a single family.
* Extend /products endpoint to be able to return any of the current four sets of product families.
* Use include_legacy query param to decide which cloud products to request.

* update boards to 0.9.2 (#18616)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Removed PostPreview from MessageHasBeenPosted payload. (#18613)

Automatic Merge

* Creating empty Channels shell (#18611)

* Creating empty Channels shell

This is the first step in moving to a product-based
isolated architecture.

For now, Channels is empty and does not contain anything.

Next step is to change App to contain Channels instead
of Server. Some of the initialization code in NewServer
would need to be moved inside NewChannels.

This would complete the full pass-through mode of accessing
everything.

The last step would be to gradually move Channels related
fields from Server into Channels, keeping Server to be
just the global level struct.

```release-note
NONE
```

* fix vet failure

```release-note
NONE
```

* Move Channels into App (#18623)

* Move Channels into App

In this PR, we make Channels as part of App
instead of Server. This is part of the transition period
of moving fields from Server to Channels.

For now, Channels contains Server. So the hierarchy is

App -> Channels -> Server.

And as a first step, we also move httpService to Channels.

```release-note
NONE
```

* Fixing another test

```release-note
NONE
```

* new method

```release-note
NONE
```

* Translations update from Weblate (#18639)

* Translated using Weblate (Polish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 91.3% (2110 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 87.1% (2014 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

Translated using Weblate (Polish)

Currently translated at 87.0% (2011 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 99.7% (2305 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (English (Australia))

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/es/

* Translated using Weblate (Swedish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (French)

Currently translated at 95.1% (2197 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (German)

Currently translated at 100.0% (2310 of 2310 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Elias  Nahum <elias@mattermost.com>
Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Anne-Laure Gaillard <alaure.gaillard@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Mark E Fuller <fuller@stossrohr.net>

* db: add db upgrade for 5.39 and upgrade to 6 (#18645)

* build: add targets for linux/darwin arm64 and include those in the package (#18491)

* build: add targets for linux/darwin arm64 and include those in the package

* update based on feedback

* store arm64 targets

* jobserver: enable prometheus metrics when running standalone jobserver (#18636)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* restore reset command as db reset (#18449)

* Remove erroneous gosaml submodule (#18660)

```release-note
NONE
```

* fix package name typo (#18665)

* Initial team service implementation (#18279)

* initial service implementation

* reflect review comments

* Unfurl Focalboard Server PR (#18271)

* Allow Embeds editing without editing

* Add focalboard to embed after it being in props

* Fix tests

* change to boards

* remove extra gunk

* Fix tests

* Add Feature Flag

* update boardsunfurl

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Display tableName and columnName for jsonb schema failures (#18672)

These are incredibly helpful during failures and should be there.

```release-note
NONE
```

* New intro, images, and links (#18610)

* Update content and links in Readme

* Add explainer to dev machine setup

* Update README.md

* Update README.md

* Update README.md

* Fix small typo (#18675)

Automatic Merge

* MM-36743: adds last_root_post_at in channels table (#18366)

* MM-36743: adds last_root_post_at in channels table

Channel recency for CRT users should not count replies,
this commit solves that issue by adding a new column to the channels
table: LastRootPostAt.
With that new info CRT users can have recent channels to work as
expected.

* Adds the 'LastRootPostAt' to the SQL scripts

* Fixes tests

* Adds LastRootPostAt migration to v6.1

* Fixes index

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Move ImageProxy inside Channels (#18656)

* Move ImageProxy inside Channels

```release-note
NONE
```

* Move back httpService

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Drop existing default on Users.Timezone prior to column type change (#18669)

* remove timedDND feature flag (#18346)

* update focalboard to 0.9.3 (#18688)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Add functionality to cleanup old jobs (#18646)

* Add functionality to cleanup old jobs

Historically, we never cleaned up old jobs from the DB
leading to them being accumulated forever.

This PR introduces functionality to cleanup old jobs
older than a defined threshold.

The functionality is set to false by default and has
to be enabled for it to work.

```release-note
2 new config settings were added.

JobSettings.CleanupOldJobs: This indicates whether to clean up old jobs
from the DB or not. Default is false.

JobSettings.CleanupJobsThresholdHours: This defines the time gap in hours beyond
which older jobs will be removed. This has no effect if the above config
setting is set to false. Default is -1
```

* fix copy pasta

```release-note
NONE
```

* address review comments

```release-note
NONE
```

* Fix lint

```release-note
NONE
```

* Use single config option for everything

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* [MM-39299] Remove outdated translations and update go-i18n library (#18674)

* Remove outdated translations

* update go-i18n dependency

* reflect review comments

* add message count for languages which has two translations for plurals

* Move cloud init back to initEnterprise (#18668)

* Move cloud init back to initEnterprise

```release-note
NONE
```

* Remove debug lines

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Improve API4 initialization (#18680)

* Improve API4 initialization

- Refactored openGraphDataCache to be inside app layer.
- Moved the cache instance from global variable to be inside server.
- Moved out the app instantiation from the global commands package
to be instantiated on every call. Only the server instance is passed.
- Moved InitLocal to be called from inside Init.

```release-note
NONE
```

* Remove commented line

```release-note
NONE
```

* [MM-38996] - Migrate from gorp to sqlx in store/sqlstore/compliance_store.go (#18633)

* migrate from gorp to sqlx in store/sqlstore/compliance_store.go

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* fix SQL syntax error

Signed-off-by: Penthaa Patel <penthaapatel@gmail.com>

* Fixes

```release-note
NONE
```

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>

* MM-36862: should remove user from participants (#18451)

* MM-36862: should remove user from participants

When deleting a reply in a thread we should also delete the participant
from the participants array. This should happen if they have no other
replies in that thread.

This commit fixes that.

* Adds warning logs

* Delete Post: fetches participants only when needed

* Minor refactor

* Remove participant should check for error in count

* Fixes error when binary_parameters=true

* Fixes: removes ArrayToJSON so we can handle the error

* Satisfies the linter

* Better error handling

* Satisfy govet

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Adding the feature flag to enable/disable calls in the mobile app (#18689)

* Pre-fill CreateAt to let link previews work. (#18698)

* Pre-fill CreateAt to let link previews work.

Because of the fact that getEmbedsAndImages has been now
refactored to work _before_ a post is saved. So the CreateAt
field of a post…
FreedomBen pushed a commit to FreedomBen/mattermost-server that referenced this pull request Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants