Commit Graph

45 Commits

Author SHA1 Message Date
Claudio Costa
077221a940 Revert "MM-55295: Improve DB performance of some APIs (#25318)" (#25852)
This reverts commit ec88ab4ee9.
2024-01-05 10:05:37 -06:00
Doug Lauder
2d1135ca46 Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin. 

- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error

Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
Devin Binnie
109f4643c6 [MM-55017] Add API method to get users for Admin Reporting (#25499)
* Add store method to get reporting data

* Some store changes

* Added app layer

* Added API call, some miscellaneous fixes

* Fix lint

* Fix serialized check

* Add API docs

* Fix user store tests leaking users

* Fix test

* PR feedback

* Add filtering for role/team/activated user, filter out bot users

* Fix mock

* Fix test

* Oops

* Switch to using struct filter

* More PR feedback

* Fix gen

* Fix test

* Fix API docs

* Fix test

* Fix possible SQL injection, some query optimization

* Fix migrations

* Oops

* Add role to API

* Fix check

* Add Client4 API call for load testing

* Fix test

* Update server/channels/store/storetest/user_store.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2023-12-08 10:30:08 -05:00
Ben Schumacher
b2ec1ff8ae [MM-55595] Use annotated logger in search layer (#25468) 2023-12-04 18:34:57 +01:00
Devin Binnie
eaa5cce3ce [MM-55143] Disallow reacting with an emoji that does not exist, limit the total number of unique reactions per post (#25331)
* [MM-55143] Disallow reacting with an emoji that does not exist

* WIP for server limit on emoji reactions

* WIP

* Implement default limit of 25 unique emoji reactions

* Add modal for reaction limit

* Fix test

* PR feedback

* Fix i18n

* Update admin string

* Merge'd

* Fixing some issues, check limits correctly based on other users reactions

* Fix typos

* Fix lint/test

* Add tests, fix other tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-27 09:11:04 -05:00
Felipe Martin
b40366dbdf [MM-55028] Added OAuthOutgoingConnection store (#25221)
* OAuthOutgoingConnection model

* added store

* make generated

* add missing license headers

* fix receiver name

* i18n

* i18n sorting

* update migrations from master

* make migrations-extract

* update retrylayer tests

* replaced sql query with id pagination

* fixed flaky tests

* missing columns

* missing columns on save/update

* typo

* improved tests

* remove enum from mysql colum

* add password credentials to store

* renamed migrations

* model change suggestions

* refactor test functionsn

* migration typo

* refactor store table names

* updated sanitize test

* oauthoutgoingconnection -> outgoingoauthconnection

* signature change

* i18n update

* granttype typo

* uppercase typo

* lowercase store name
2023-11-20 09:42:07 -05:00
Devin Binnie
1bd72bdb99 [MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job to keep track of post stats for Postgres (#25152)
* [MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job for Postgres

* Check fixes

* Fix type issue

* Add verification that lastlogin was updated

* PR feedback

* Morge'd

* Morge'd again

* Merge'd

* Update admin setting strings

* WIP

* PR feedback

* Oops

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 11:26:27 -05:00
Agniva De Sarker
ec88ab4ee9 MM-55295: Improve DB performance of some APIs (#25318)
Load tests show that channelstore.GetMember and
channelstore.GetMembersForUser are among the chief
queries that take up CPU in the DB.

In this PR, we attempt some strategic optimizations to
reduce/optimize calls to channelstore.GetMember

1. Optimize  `(a *App) HasPermissionToChannel`

We replace GetChannelMember with GetAllChannelMembersForUser
because it's cache backed. So although it gets more data,
it does not hit the DB and saves some latency.

2. Optimize getPostsForChannelAroundLastUnread

We repace getChannelMember with getChannelMemberOnly
which is a lite version of the store call which queries
just the ChannelMembers table. This is because
in the app layer, we just use the LastViewedAt attribute.
Therefore, there is no reason to join with 5 tables when
a single table can do the job.

3. Optimize publishWebsocketEventForPermalinkPost

We use GetAllChannelMembersById instead of GetChannelMembersPage
which again joins with a lot of other tables.

4. Optimize countMentionsFromPost

Again, we replace GetChannelMember which is a costly call joining
multiple tables, with GetAllChannelMembersNotifyPropsForChannel
which is cache-backed and gives us just what we need in the app
layer - notify props.

```release-note
Make small optimizations in several DB calls:
- App.HasPermissionToChannel
- getPostsForChannelAroundLastUnread
- publishWebsocketEventForPermalinkPost
- countMentionsFromPost
```

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

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-13 21:15:57 +05:30
Ben Schumacher
c7461751f2 Use request.CTX instead of *request.Context (#24877)
* Use request.CTX instead of *request.Context

* Fix tests
2023-10-30 16:33:37 +01:00
Daniel Espino García
6125b0ca7f MM-54778 Fix mark as unread on GMs (#24880)
* Fix mark as unread on GMs

* Don't count own messages in gms when marking as unread

* Change argument name

* Rename userId

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-10-24 15:27:30 +02:00
Devin Binnie
89492a6a46 [MM-53428] Delete empty drafts on upsert (#24046)
* [MM-53428] Delete empty drafts on upsert

* Add migrations to fix existing drafts

* Fix CI

* Delete empty drafts entirely from the DB

* Fix lint

* Implement batch migration for deleting drafts

* Missing store layers

* Add updated mock

* Remove unnecessary test

* PR feedback

* Add check for cluster migration

* Fix MySQL

* Don't check for len<2

* Bit of PR feedback

* Use query builder for parameters

* PR feedback

* More PR feedback

* Merge'd

* unit test GetLastCreateAtAndUserIdValuesForEmptyDraftsMigration

* simplified builder interface

* fix DeleteEmptyDraftsByCreateAtAndUserId for MySQL

* rework as batch migration worker

* fix typo

* log ip address on version mismatches too

* simplify reset semantics

* remove trace log in favour of low spam

* document parameters for clarity

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2023-10-12 10:52:10 -04:00
Agniva De Sarker
3dd9e3715c Goodbye, GraphQL (#24827)
```release-note
NONE
```
2023-10-12 09:47:35 +05:30
Ben Schumacher
13c05a571f Migrate store methods to use request.Context instead of context.Context (#24836) 2023-10-11 13:08:55 +02:00
Harshil Sharma
39d6cb8008 MM-53125 Add feature to convert group message to private channel (#24421)
* Added convert to channel menu item

* WIP

* refactored channel name input field and created conversion modal

* style

* style

* WIP

* wip

* Created API to fetch common teams of GM members

* Added UI for all members deactivated

* Fetched common teams in client

* WIP

* Added a required attribute to DropdownInput component

* Fixed a case with dropdown input required flag

* WIP

* API first draft

* Genetayed layers and mocks

* Fixed create channel bug

* WIP

* Added cache invalidation

* Calling API from client

* Updated API to accept name and display name as well

* WIP

* Moved converted GM to correct category

* Style fixes

* Added logic to move user to new team/channel after GM conversion

* Prevented guest user from performing action

* Added loading indicator

* Added smoother height transistion when loading finishes

* UI imporvements

* WIP

* Formatted GM conversion message on client side

* lint fix

* Moved convert option from sidebar menu to channel header menu

* Some cleanup

* Updated server layers

* Fixed i18n

* Fixed types

* Fix server i18n

* Fixed channel creation bug

* Added store test for GetCommonTeamIDsForMultipleUsers

* Server tests done

* Updated snapshots

* Updated layers

* lint fix

* Update tests

* For CI

* lint

* restored debug code

* Used user ID instead of username in channel conversion post

* WIP

* Review fixes

* LInt fixes

* Test fix

* WIP

* WIP

* WIP

* wip

* Review fixes, lots of them

* Review fix

* Disabled WIP test

* test

* Cleanup

* Test fix

* removed testing line

* Fixed incorrect default message

* Review fixes

* Fixes

* lint and i18n fix

* Setting category on server side

* updated i18n

* Updated tests

* Added tests

* Refs cleanup

* added test

---------

Co-authored-by: Harshil Sharma <harshilsharma@Harshils-MacBook-Pro.local>
2023-09-19 14:41:34 +02:00
Devin Binnie
11cdd2b66b Fix flaky/incorrect desktop token test, clarify the parameter names (#24565)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-09-19 08:49:51 +02:00
Claudio Costa
b4a47803e6 [MM-54456] Fix potential read after write issue when loading license (#24524)
* Fix potential read after write issue when loading license

* Use upsert
2023-09-13 14:47:12 -06:00
Felipe Martin
f65dad83bb Migrate emojiStore to use request.CTX instead of context.Context (#24514)
* migrate emojistore to request.ctx

* use mlog.CreateConsoleTestLogger

* Add comment to WithMaster and RequestContextWithMaster
2023-09-11 17:07:29 +02:00
Ben Schumacher
30b12f199b [MM-54132] Use annotated logger for log messages from jobs (#24275) 2023-09-07 08:50:22 +02:00
Ben Cooke
791ee40568 [MM-53291] Data retention improvements (#24253)
* adding new migration for RetentionIdsForDeletion, changing logic for deleting orphaned reactions. Updating delete user and channel endpoints to remove respective reactions
2023-09-06 08:25:27 -04:00
Devin Binnie
a3b194581f [MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#24140)
* [MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers

* PR feedback

* Add support for mattermost-dev protocol for development use

* Update server/channels/db/migrations/postgres/000110_create_desktop_tokens.up.sql

* Fix silly typo

* Update server/channels/db/migrations/postgres/000110_create_desktop_tokens.up.sql

* Remove storage of client token, only validate it on the client

* Update migrations

* Add concurrently create index

* Remove CONCURRENTLY for now

* Fix issue with changing history

* Remove old migration

* Use idempotent statement to drop old index

* Remove reference to old table
2023-08-30 11:21:43 -04:00
Julien Tant
9d569df9b4 [MM-22133] Allow exporting and importing archived channels (#23724) 2023-08-25 17:55:47 -07:00
Jesús Espino
5f7482e541 Remove remote users from the license counting and explicitly dissallow them to log in (#22582)
* Making all the counts aware of Remote users

* Disable login for remote users

* Adding tests for login remote_users error

* Adding tests for the store

* Adding frontend part of not counting remote users in the license

* Addressing PR review comment

* Adding the new ExternaUserId field to users

* Running make migrations-extract

* Running make app-layers and make gen-serialized

* Revert "Adding the new ExternaUserId field to users"

This reverts commit 12e5fd5189.

* Adding GetUserByRemoteID methods

* Adding needed migration for users

* i18n-extract

* Fixing postgres increase remote user id field size migration up and down

* run make gen-serialized

* Removing migration code

* Not count remote users as part of the cloud pricing

* Add the cloud subscription when a user gets promote from remote to not-remote

* Fixing merge problems

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-14 17:54:10 +02:00
Daniel Espino García
e9b3afecc2 Mark category as read (#24003)
* Mark category as read

* Fix lint and test

* Fix tests

* Fix test and remove wrong aria

* Address server issues and add mark as read for unreads

* Missing changes

* Fix tests

* fix tests

* Add confirmation popup to mark as read category

* Always use viewMultipleChannels and other fixes

* Remove unneeded code

* Fix test

* Address feedback

* Address feedback

* Fix tests

* Fix test

* Fix tests

* Update aria-haspopup depending on the number of channels to mark as viewed

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-14 10:01:02 +02:00
Agniva De Sarker
b47754e268 MM-53747: Do not start if job is in-progress as well. (#24115)
We missed this out last time. It's possible in an HA
scenario for a second pod to start later while the other
job is in-progress. In that case, it would schedule
two jobs.

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

```release-note
NONE
```
2023-07-26 20:32:50 +05:30
Harshil Sharma
26617fcbdc Remove insights (#23952)
* removed server side

* Updated store layer

* unused import

* Updated autogenerated code template

* Updated tests

* lint fix

* unused translations

* webapp side

* Updated i18n

* lint fix:

* type fix

* Updated snapshots

* Removed insights from API specs

* updated e2e

* Updated e2e tests

* Updated e2e tests

* Removed insights tests

* Removed Insights as possible channel to load in sidebar from test

* Removed more insights tests

* More e2e fixed

* More cleanup

* Lint

* More cleanup in client4 and boards api

* More cleanup

* Fixes

* lint fix

---------

Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-25 12:34:38 +05:30
Agniva De Sarker
6d6e589c11 MM-53747: Create job to encode older image paths (#24073)
Bifrost now encodes all image paths. Due to this
one-way translation, we need to encode all the older
image paths as well.

After this is done, we can remove the double-lookup.

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

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-25 08:38:35 +05:30
Jesse Hallam
89e65257a6 Remove command palette POC (#24044)
* Revert "POC: Cross-team recent search (#20027)"

This reverts commit aa59c28b04, preserving
a few code tidyings unrelated to the original PR.

* Revert "Add feature flag for command palette (#20011)"

This reverts commit c78c5ce3f3.
2023-07-24 10:31:06 -03:00
Sinan Sonmez (Chaush)
628273d98d MM42267: Add member count in the browse channel modal (#23800)
* add base for calling the endpoint

* add endpoint and handler

* update store and layers

* call the endpoint

* align types

* update app layers

* generate mocks

* complete handler

* finish store query

* add todos

* add ui for member count

* add selector

* add a todo

* add cache layer

* optimize calls in FE

* handle invalidation of the cache

* fix go style

* fix test

* use existing channel layer count

* fix import error

* delete unnecessary code

* write tests for channel cache layer

* fix testname

* fix mocks

* fix cache layer test

* fix a test

* really fix the test

* write more tests for server

* address PR comments

* remove comment

* rename more_channels to browse_channels

* fix style

* update snapshot

* add translations

* Revert "add translations"

This reverts commit 56476a5dab.

* add only related translations

* address PR review points

* add test

* fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-19 11:45:27 +05:30
Agniva De Sarker
3c31629813 MM-53669: Use the cache layer for EmojiStore.GetMultipleByName (#24030)
There was already a cache present for emoji names. But we weren't using
it for the GetMultipleByName method. Now we implement that method
to look up the cache for every emoji name passed.

Secondly, a bigger problem was that we were making the DB call for system
emojis as well. Since system emojis aren't stored in the DB, it would
fall through the cache layer and always make a redundant DB call. In the
profiles, this should up as taking 16% of the total time to serve
a getPostsForChannel API endpoint.

We fix this by filtering the emojis to only custom emojis
before making the call.

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

```release-note
NONE
```
2023-07-18 20:27:48 +05:30
Devin Binnie
a6a9664e53 [MM-53192] Patch Show Full Name issue in Insights team_members API (#24027)
* [MM-53192] Patch full name leak in Insights team_members API

* Update server/channels/app/team.go

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

---------

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2023-07-18 09:41:16 -04:00
Devin Binnie
823ef27d6c Revert "[MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#23795)" (#24039)
This reverts commit abdf4e58c3.
2023-07-17 10:54:53 -04:00
Devin Binnie
abdf4e58c3 [MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#23795)
* WIP

* Add rate limiting for desktop token API

* Missing mocks

* Style fixes

* Update snapshots

* Maybe use an actual redirect link :P

* Refactoring for tests

* Add tests for server

* Fix lint issue

* Fix tests

* Fix lint

* Add front-end screen component

* Component logic

* Style changes

* Quick style fix

* Lint fixes

* Initial PR feedback

* Enable logging into the browser as well when completing the login process

* Refactor to push more logic to the other component

* Remove unnecessary helper code

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-07-12 09:25:05 -04:00
Julien Tant
86f0877799 [MM-53086] Remove SendWelcomePost A/B test and feature (#23733)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-06-16 12:13:23 -07:00
Pablo Andrés Vélez Vidal
6a5bb53963 [MM-52969] Revert "MM-51482_Create Apps Category and link to bots DM (#22918)" (#23647)
* Revert "MM-51482_Create Apps Category and link to bots DM (#22918)"

This reverts commit 1051925eec.

* Revert "MM-51711_Feature flag: APPS sidebar category (#22766)"

This reverts commit 9156205178.
2023-06-14 11:05:21 +02:00
Agniva De Sarker
efaa6264cc MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.

https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.

For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
2023-06-11 10:54:35 +05:30
Vishal
9399ce8637 [MM-47751][MM-48102] MPA: Send Persistent Notifications (#21619)
* MM-46410: adds urgency on mention counts

We have introduced priority for posts in
https://github.com/mattermost/mattermost-webapp/pull/10951.
We do need to color the mention badges in the webapp with a prominent
color when a mention is posted in an urgent message.
A thread has urgent mentions if the root post is marked as urgent, and
the replies contain mentions to the user viewing the thread.

This PR adds two columns, urgentmentioncount, and isurgent, in
channelmembers, and threads tables respectively.
Furthermore when asking for team/thread mention counts, we also return
urgent mention counts for the user.

* Adds PostAcknowledgements table and apis

* job init and fetch mentions

* add-migrations

* delete-expired

* send-notifications

* Fetches post priority in batches

* stop-notifications

* stop-notification-on-reply

* MM-47750: Adds PostAcknowledgements table and apis

- Adds post acknowledgement api/app/store methods to be able to save and
delete post acknowledgements by users.
- Adds wesbsocket events for acknowledgement created/deleted
- Returns post acknowledgements in the post's metadata

* add-license-check

* add-pagination

* delete on channel and team

* validate guests

* add configs

* move create priority post check from app to api

* Add desktop notifications

* check status

* use config in job

* add IsUrgent check

* Add last-sent-at

* validate max recipients

* Update lastSentAt

* Validate min. recipient

* send email notification only once

* remove email notifications

* use latest time from config to run job

* Add notifications counter

* publish events to mentioned users only

* pickup license updates in scheduler

* don't allow post owner to stop notifications

* follow normal notifications behaviour

* Validates persistent notifications interval

* move logic of handling valid and expired posts into sql

* Adds persistent notifications in the webapp

---------

Co-authored-by: koox00 <3829551+koox00@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-05-18 23:44:12 +05:30
Jesse Hallam
bb02b35048 Expose public/ API as submodule (#23345)
* model -> public/model

* plugin -> public/plugin

* public/model/utils -> public/utils

* platform/shared/mlog -> public/shared/mlog

* platform/shared/i18n -> public/shared/i18n

* platform/shared/markdown -> public/shared/markdown

* platform/services/timezones -> public/shared/timezones

* channels/einterfaces -> einterfaces

* expose public/ submodule

* go mod tidy

* .github: cache-dependency-path, setup-go-work

* modules-tidy for public/ too

* remove old gomodtidy
2023-05-10 13:07:02 -03:00
Julian Mondragón
1051925eec MM-51482_Create Apps Category and link to bots DM (#22918) 2023-04-27 19:44:14 -05:00
Kyriakos Z
a24111f9bd MM-45009: Delete ThreadMemberships from "left" channels (#22559)
* MM-50550: Filter out threads from "left" channels v2

Currently leaving a channel doesn't affect the thread memberships of
that user/channel combination.
This PR aims to filter out all threads from those channels for the user.

Adds a DeleteAt column in the ThreadMemberships table, and filter out
all thread memberships that are "deleted".
Each time a user leaves a channel all thread memberships are going to be
marked as deleted, and when a user joins a channel again all those
existing thread memberships will be re-instantiated.

Adds a migration to mark all existing thread memberships as deleted
depending on whether there exists a channel membership for that
channel/user.

* Added migration files into list

* Fixes tests

* Fixes case where DeleteAt would be null

* Guard thread API endpoints with appropriate perms

* Deletes ThreadMembership rows upon leaving channel

* Minor style changes

* Use NoTranslation error

* Refactors tests

* Adds API tests to assert permissions on Team

* Adds tests, and fixes migrations

* Fixes test description

* Fix test

* Removes check on DM/GMs

* Change the MySQL query in the migration

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-19 15:20:34 +03:00
Agniva De Sarker
b200a07881 v8.0 module release (#22975)
https://mattermost.atlassian.net/browse/MM-52079

```release-note
We upgrade the module version to 8.0. The new module path is github.com/mattermost-server/server/v8.
```


Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2023-04-18 11:05:28 +05:30
Rohitesh Gupta
7325c38c39 Fixes MM-50733 (#22784) 2023-04-05 21:58:21 +02:00
Kyriakos Z
4d2ed469bf MM-49564: Drafts upsert in the Store vs App layer (#22530)
* MM-49564: Upsert in the Store vs App layer

Refactor drafts so that Upserting a draft would happen in the DB and not
in the app layer.

* Fixes mocks

* Fixes tests

* Fixes translations

* Fixes tests

* Update tests

* Fixes tests

* Addresses review comments

- renames Save => Upsert
- removes Sleep from tests

* Fixes flaky test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-04-01 10:32:40 +03:00
Allan Guwatudde
0140e94d77 [MM-49751] - Turn off Inactive Server Email (#22648)
* [MM-49751] - Turn off Inactive Server Email

* remove unused var

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-27 22:38:19 +03:00
Agniva De Sarker
56b18ca7bf MM-45956: Optimize FileInfo stats query (#22603)
* MM-45956: Optimize FileInfo stats query

We Denormalize Post.ChannelId on FileInfo.ChannelId

```release-note
The file info stats query is now optimized by denormalizing the channelID column into the table itself. This will speed up the query to get the file count for a channel on clicking the RHS.

Migration times:
On a MySQL 8.0.31 DB with
1405 rows in FileInfo and 11M posts, it took around 0.3s

On a Postgres 12.14 DB with
1731 rows in FileInfo and 11M posts, it took around 0.27s
```

https://mattermost.atlassian.net/browse/MM-45956
2023-03-23 22:14:04 +05:30
Doug Lauder
c943ed6859 Mono repo -> Master (#22553)
Combines the following repositories into one:

https://github.com/mattermost/mattermost-server
https://github.com/mattermost/mattermost-webapp
https://github.com/mattermost/focalboard
https://github.com/mattermost/mattermost-plugin-playbooks
2023-03-22 17:22:27 -04:00