Граф коммитов

2244 Коммитов

Автор SHA1 Сообщение Дата
Martin Kraft
cd487c812c MM-41211: Allows rollback without destroying previous config setting. (#20137)
* MM-41211: Allows rollback without destroying previous config setting.

* MM-41211: Revert to original logic for unused config settings.

* MM-41211: Moves days defaults before hours defaults.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-05 10:41:18 -04:00
Agniva De Sarker
89fac9d485 MM-41153: Add seats deployed to support packet (#20125)
Support packet contains 2 new fields:
1. Active users.
2. License supported users.

We refactor the code to its separate file.

```release-note
NONE
```
2022-05-03 21:13:16 +05:30
Jesse Hallam
72a5d99ae3 MM-43770: Rename to Threads.ThreadDeleteAt (#20074)
Old versions of the Mattermost server did not qualify queries scanning both `Posts` and `Threads`, and choke on the ambiguity in deciding between the new `DeleteAt` on `Threads` and the `DeleteAt` on `Posts` in existing queries.

While this problem is transient only while running multiple server versions, it effectively makes our backwards compatibility guarantee void, not to mention complicating cloud deployments.

Work around this by renaming `Threads.DeleteAt` to `Threads.ThreadDeleteAt`. The old migration is nulled out, but remains, since some test servers have already upgraded and manually fixing each affected instance would be problematic. Thew new migration takes care of removing the old column -- if it ever existed.

Fixes: https://mattermost.atlassian.net/browse/MM-43770

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-29 14:42:38 -03:00
Martin Kraft
cb3d8f0a1c MM-41211: Replaces SessionLength*InDays with SessionLength*InHours. (#19838)
* MM-41211: Replaces SessionLength[Web|Mobile|SSO]InDays with SessionLength[Web|Mobile|SSO]InHours.

* MM-41211: Clear the value of the old config settings.
2022-04-28 17:31:35 -04:00
Nick Misasi
373c4655e6 [MM-43337] Updating email templates for trial will end and trial ended emails (#19976)
* Updating email templates for trial will end and trial will end emails

* put back variable

* Rebuilding

* fix tests

* Updates

* [MM-43339] Add Cloud Subscription Upgrade Confirmation Email (#19989)

* Add Cloud Upgrade Confirmation email

* Updates

* String change

* i18n-extract

* Updates

* make email-mocks

* Appease linter

* Add a test

* GMAIL NEVER RENDERS RIGHT

* Important EVERYWHERE because gmail just cant deal

* l

* Last one

* Update image

* Update tests

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-28 10:06:16 -04:00
Mylon Suren
52ac449012 [MM-42739] Insights - Top Channels API Endpoint (#19953)
* [MM-42739] Initial setup for top channels for team

* [MM-42739] Add initial tests

* [MM-42739] Update tests

* [MM-42739] Add top channels for user

* [MM-42739] Fix query

* [MM-42739] Update query

* [MM-42739] Improve query performance

* [MM-42739] Remove rank

* [MM-42739] Fix tests to use new time range today

* [MM-42739] Add tests for top channels for user

* [MM-42739] Add test for pagination

* Remove top channels by time struct

* [MM-42739] Update test names

* [MM-42739] Remove rank from top reactions

* [MM-42739] Return empty array instead of nil when result is empty

* [MM-42739] Add additional tests and update permissions check for teams

* [MM-42739] Add excluded channel tests for top reactions

* [MM-42739] Move insights to api4/insights and keep time range as string until required

* [MM-42739] Update queries only check DeleteAt after union

* [MM-42739] Improve query performance by using publicchannels table

* [MM-42739] Fix broken query after merge
2022-04-26 14:42:24 -04:00
Nathaniel Allred
d4db43c95e Mm 43084 add cloud workspace limits endpoint (#20041)
* add cloud workspace limits endpoint
2022-04-22 14:23:19 -05:00
Claudio Costa
92c5c256ef Allow per connection WebSocket broadcasts (#19993) 2022-04-22 15:53:42 +02:00
Jesse Hallam
5bd223c836 MM-43045: minimize JOIN Posts (#19934) 2022-04-19 17:06:31 -03:00
Agniva De Sarker
c78c5ce3f3 Add feature flag for command palette (#20011)
```release-note
NONE
```
2022-04-18 14:43:47 +05:30
Kyriakos Z
79e36d4596 [MM-41185]: new API to mark thread as unread (#19951)
* [MM-41185]: new API to mark thread as unread

Until now we mark a thread as read/unread by sending a timestamp to the
server. This created some issues when marking a thread as unread from a
post. We needed to send the post.create_at - 1 as a timestamp but we
didn't do so consistently.

This commit adds a new API to set a thread as unread by post id.
Making all clients agnostic of the timestamp, and thus solving consistency issues.

Endpoint: /api/v4/users/{user_id}/teams/{team_id}/threads/{thread_id}/set_unread/{post_id}

* Updates client.go adding SetThreadUnreadByPostId

* Guards endpoint behind read channel permission

* Returns status 400 if post_id not belong in thread

* Root post as post_id should be permitted
2022-04-15 10:55:47 +03:00
Ibrahim Serdar Acikgoz
6ab7cd0f1a jobs: add config cleanup job (#19987) 2022-04-15 10:31:10 +03:00
Mylon Suren
99f02fe96e [MM-42742] Add top reactions endpoint (#19850) 2022-04-14 13:09:35 -04:00
Agniva De Sarker
c6dcf460b2 MM-43232: Racy test TestWebsocketRace (#19969)
We wait until the loop has exited to finish the test

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

```release-note
NONE
```
2022-04-14 13:25:19 +05:30
Agniva De Sarker
6eb83812e1 Propagate the parse error for URLs (#19972)
During config validation, we would omit the actual error.
This makes debugging difficult.

```release-note
NONE
```
2022-04-13 22:20:46 +05:30
Mattermod
3cd3c7dc9a Update minor version to 6.7.0 (#19973)
Automatic Merge
2022-04-13 18:57:05 +03:00
Agniva De Sarker
c0b2aae84e MM-43340: Fix racy test TestGraphQLChannelMembers (#19968)
We take a shallow copy of the team pointer before
we pass that to the other functions.

This is because the resolvers run in separate
goroutines.

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

```release-note
NONE
```
2022-04-13 18:50:33 +05:30
Pablo Andrés Vélez Vidal
6881b12af9 MM-39565 - remove top option ab testing (#19966)
Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-04-12 18:44:03 -05:00
Kevin Sicong Jiang
5cb31a114a MM-41909: Allow 1 char channel name (#19845)
* [ MM-41909 ] Allow 1 character channel names

Change minimal length to 1

* [ MM-41909 ] Fix localization string

* [ MM-41909 ] Modify condition to allow 1 char channel name

* [ MM-41909 ] fix formatting

* [MM-41909] Linting fix

* [MM-41909] Fix regex

* [MM-41909] Localization update

* [MM-41909] Attempt to fix test

Co-authored-by: Kevin Jiang <>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-12 11:17:15 -04:00
Pablo Andrés Vélez Vidal
4b354685e9 MM-39058 - invite people to join team and channels (#19849)
* MM-39058-invite-to-team-from-add-channel

* fix tests by validating the memberInvite is not nil

* fix i18n texts

* fix lint problem

* fix translation lines

* fix the data structure

* modify api4-team_local file to match with the expected structure

* fix unit tests, fix translation tests

* remove go routine cause not necesary

* add unit test for invite to team and channel

* remove unnecessary validation

* allow both data structures, simple string array and object with memberInvite struct

* fix texts

* fix linter

* fix problems with graceful invites workflow

* handle error while parsing body

* fix unit tests

* take the address just once

* rename channels to channelIds

* fix unit tests

* add tests and fix local channels invite support

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-04-08 12:20:44 -05:00
Mylon Suren
6da1d90c4a [MM-38615] Permalink previews for DMs/GMs (#19765) 2022-04-07 17:32:18 -04:00
mkraft
ce2646de3e Disambiguates some units. (#19875)
* Disambiguates some units.

* Updates DB attribute.

* Updates some more error-prone units.

* Updates some tests with legible constants.

* Updates query for MySQL case sensitivity.

* Fixes more casing issues.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-07 13:58:40 -04:00
Michael Kochell
7631035165 Prepackage Apps plugin and enable Apps feature flag by default (#19870)
* prepackage with apps 0.7.0

* fix config comparison test

* update apps plugin version to 1.0.0

* remove irrelevant whitespace change

* change apps plugin version to 1.0.1

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-06 21:32:56 -04:00
Agniva De Sarker
2e027ae927 Optimize marshalling for jsonb types (#19898)
We check for the presence of binary_parameters
in the DSN and add the 0x01 byte accordingly.

This helps us avoid casting to string
and efficiently use the database.

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-06 15:01:32 +05:30
Ashish Bhate
9521797b15 MM-40148: threadsOnly query param for user threads (#19833)
* MM-40148: threadsOnly query param for user threads

Currently we always calculate counts when fetching user threads.
Those counts include total, unread replies, and unread mentions,
and are potentially expensive to calculate.

This commit adds a new query param 'threadsOnly' which won't calculate
any counts and just return threads.

Co-authored-by: koox00 <3829551+koox00@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-04 17:50:13 +05:30
Allan Guwatudde
c17e210dd0 [MM-40962-2] - Fix unnecessary logging in license expiration check (#19826)
* [MM-40962-2] - Fix unnecessary logging in license expiration check

* skip check for TE

* document

* feedback impl-1

* fix logic

* remove saving of renewal token

* fix lint

* remove commented code

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-31 18:25:46 +03:00
Allan Guwatudde
fa56ee9d9a [MM-42713] - Remove cloud user limit restrictions (#19835)
* [MM-42713] - Remove cloud user limit restrictions

* remove unused code

* fix translations

* feedback impl-1

* enterprise code clean up

* feedback impl-2

* fix mocks

* fix translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-31 18:24:38 +03:00
Agniva De Sarker
f8a3119426 MM-41260: Revamp ES/Bleve batching logic (#19841)
The older method used to reply completely on timestamps
to take batches of items in a timestamp range and then
just incrementing the timestamp. This led to handling
edge-cases such as more items than the batch count, all
having the same timestamp.

Additionally, relying on timestamp as the page cursor
meant that indexing was not very efficient if you had
several items spread out across large spans of time.

To get away from all of that we use a proper cursor-based
approach consisting of createAt+Id. With this, we move
completely to a constant page size where we can fetch
a given number of objects irrespective of when they
were created. This makes indexing much more faster and
efficient.

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

```release-note
Elasticsearch and Bleve indexing have been revamped to be much
more efficient and faster. The config parameter BulkIndexingTimeWindowSeconds
for both elasticsearch and bleve have been removed.
A new config parameter called BatchSize has been introduced instead.
This parameter controls the number of objects that
can be indexed in a single batch. This makes things
more efficient and maintains a constant workload.
```
2022-03-31 10:46:01 +05:30
Julian Mondragón
baf9f69c27 MM-41407_Remove FF for MM-39053 Default Notifications (#19851) 2022-03-30 12:07:03 -05:00
Allan Guwatudde
82c8bd33ed [MM-42703] - Add configuration setting to disable Inactive Server email notification (#19831)
* [MM-42703] - Add configuration setting to disable Inactive Server email notification

* remove log

* add config to telemetry

* fix lint
2022-03-30 11:31:46 +03:00
Mmbot
2aa06529c5 Update minor version to 6.6.0 2022-03-29 17:59:47 +03:00
Ben Cooke
aa696ba36d [MM-42627] Feature flag for insights (#19839)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* feature flag for insights

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2022-03-28 18:30:05 -04:00
Julien Tant
0babc01749 [MM-41998] Channel Info RHS: display number of files for a channel (#19822)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-25 13:28:14 -07:00
Ibrahim Serdar Acikgoz
3e8b81c0c7 graphql: Add channel stats under channel (#19804)
* graphql: Add channel stats under channel

* add permission check
2022-03-25 11:59:57 +03:00
Agniva De Sarker
c1f3827801 MM-38164: Paginate the GetPostThread API (#19485)
We implement a cursor based pagination model
to page through the posts in a given thread.

The cursor is a combination of the post.CreateAt+
post.Id to differentiate multiple posts in a given
timestamp.

Some additional parameters like direction, fromPost,
fromCreateAt and perPage were introduced to implement
this.

```release-note
NONE
```
2022-03-24 12:51:41 +05:30
Ashish Bhate
2385bbdd50 MM-42535: Set ThreadAutoFollow to true by default (#19797)
Summary
A number of performance improvements shipped in v6.5 to support CRT with the ThreadAutoFollow bookkeeping enabled but the frontend features disabled. To prepare for a later enabling of the frontend features by default, we want to encourage customers to re-enable ThreadAutoFollow, and plan to enable this by default in v6.6.

Ticket Link
https://mattermost.atlassian.net/browse/MM-42535
2022-03-23 21:00:53 +05:30
Carrie Warner (Mattermost)
dcd66d2146 MM-41988 Updated links to legacy domain about.mm.com (#19552)
* Updated links to legacy domain about.mm.com

* Legacy link updates

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* Reverting - only need to change en.json

* about.mm.com URL updates

* mattermost.org URL updates

* forum.mm.org URL update

* Update .github/ISSUE_TEMPLATE.md

* Update .github/ISSUE_TEMPLATE.md

* Un-deleted language files

* Update README.md

* Update tests/test-config.json

* fix some test due to url updating (#19787)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
2022-03-16 19:47:57 +08:00
Ben Schumacher
7710a2fe37 [MM-40735] Add MattermostAppID to OAuth app (#19214) 2022-03-15 18:00:27 +01:00
Ibrahim Serdar Acikgoz
b03d87af40 [MM-41576] Add schema version to the client configuration (#19757)
* revamp db version and add applied migrations endpoint

* replace old schema version with new

* add db version subcommand

* add to local api

* reflect review comments

* log errors

* remove setting the version from model.CurrentVersion

* fix a test

* use different field for schema version

* add build hash and current version to the support packet

* add tests

* update test to use new assets
2022-03-15 16:39:23 +03:00
Michel Engelen
f4f8dcc88b remove feature flag for inline post editing (#19761) 2022-03-14 13:57:22 +01:00
Michel Engelen
77e779bf4f remove feature flag for global header (#19763) 2022-03-14 13:46:47 +01:00
Michel Engelen
16a1d8fe72 completely remove feature flag for "workspace optimization dashboard" (#19754) 2022-03-14 13:45:21 +01:00
Allan Guwatudde
d543db6186 [MM-41573] - Remove FF for MM-39060 Resend Invite Interval (#19652)
* [MM-41573] - Remove FF for MM-39060 Resend Invite Interval

* feedback impl
2022-03-09 17:57:25 +03:00
Jesse Hallam
a2a78577e9 Revert "[MM-41576] Revamp database schema version (#19586)" (#19746)
* Revert "[MM-41576] Revamp database schema version (#19586)"

This reverts commit 645fee3fe3.

* Revert "MM-42049 - license endpoint not working (#19686)"

This reverts commit 4fe89e5847.
2022-03-08 16:28:28 -04:00
Michel Engelen
f8cd26cb6b set default value for workspace optimization dashboard feature flag to true (#19734)
Automatic Merge
2022-03-08 18:44:20 +02:00
Ibrahim Serdar Acikgoz
645fee3fe3 [MM-41576] Revamp database schema version (#19586)
* revamp db version and add applied migrations endpoint

* replace old schema version with new

* add db version subcommand

* add to local api

* reflect review comments

* log errors

* remove setting the version from model.CurrentVersion

* fix a test
2022-03-08 18:13:37 +03:00
mkraft
21f1d2aabc MM-42201: Enforce group is not the same as username. (#19660)
* MM-42201: Enforce group is not the same as username.

* MM-42201: Adjust test for change to translation id.
2022-03-08 09:14:22 -05:00
Agniva De Sarker
cf6aa85d28 MM-42268: We add more fields to Channel and Team (#19675)
Also added sessions as part of the user object

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 20:14:53 +05:30
Maria A Nunez
3be329b5e8 Defaulted use case onboarding feature flag to true (#19690)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-04 18:49:40 -05:00
Julien Tant
b70338071f [MM-41579] Remove FF guided channel creation (#19673)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-04 16:40:04 -07:00