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

14526 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
a2fc602bc2 MM-40813: Use config service more extensively (#19679)
https://mattermost.atlassian.net/browse/MM-40816

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 20:48:55 +05:30
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
Daniel Schalla
9f76cb6b95 Mitigate Docker Compose Race in Test Stages (#19718)
* Mitigate Docker Compose Race in Test Stages

* Patch second occurrence
2022-03-07 15:12:32 +01:00
Agniva De Sarker
84a733ed56 Move cluster init during server start (#19684)
After refactoring the channels init, the
config service under channels won't have
the config hash until the product gets
started. This caused an issue during
cluster initialization.

Therefore moved it after the product start.

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-07 19:41:52 +05:30
Claudio Costa
897e7bb9e7 Only set cluster if unset (#19683) 2022-03-07 10:24:23 +01:00
Jesse Hallam
f5b5a3c746 MM-40302: CRT, fix performance of MarkAllAsReadInChannels (#19566)
* deadcode: remove UpdateChannelLastViewedAt

* deadcode: remove ThreadStore.(Save(Multiple)|Update|Delete)

* deadcode: followThead in App.MarkChannelAsUnreadFromPost

* document ThreadMembership, Thread structs

* maintain LastUpdated consistently

Whenever we touch a `ThreadMembership` record, we should be setting `LastUpdated` to the current timestamp. The mobile client relies on this to detect changes to these records.

* simplify: never updateThreads from `App.MarkChannelAsUnreadFromPost`

Change all invocations of `ChannelStore.UpdateLastViewedAtPost` from `App.MarkChannelAsUnreadFromPost` to pass `updateThreads` as `false`. When `ChannelStore.UpdateLastViewedAtPost` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `LastViewed`).

The overall CRT feature continued to work, because `App.MarkChannelAsUnreadFromPost` directly updates the relevant thread memberships via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.UpdateLastViewedAtPost

* simplify: never updateThreads from App.SendNotifications

Change all invocations of `ChannelStore.IncrementMentionCount` from
`App.SendNotifications` to pass `updateThreads` as `false`. When `ChannelStore.IncrementMentionCount` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `UnreadMentions`).

The overall CRT feature continued to work, because `App.SendNotifications` directly updates the relevant thread memberships mention counts via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.IncrementMentionCount

* fix & rename ThreadStore.UpdateUnreadsByChannel

Rename `ThreadStore.UpdateUnreadsByChannel` to `ThreadStore.UpdateLastViewedByThreadIds`, making it unconditionally set the `LastViewed` for the given threads (as well as `LastUpdated`).

All previous invocations of this method that passed `updateViewedTimestamp` have been previously removed.

* unrelated gofmt -w -s changes to satisfy linter

* always set LastUpdated to model.GetMillis()

* deadcode: ThreadStore.SaveMembership

* fix TestMarkUnreadWithThreads

* MM-40302: CRT, use updateThreads param vs. MarkAllAsReadInChannels

`MarkAllAsReadInChannels` was the subject of a significant performance regression in v5.37 and is known to be very inefficient, by virtue of always writing to an ever increasing number of rows, and doing so on common events like simply viewing a channel.

Fortunately, `ChannelStore.UpdateLastViewedAt` already supported an `updateThreads` parameter that implemented the start of an improved algorithm: query the set of threads with newer posts, and then update only /those/. Missing was the need to reset the `UnreadMentions`, but thanks to the previous simplifications in #19523, we can make this change largely without impacting other semantics.

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

* fix MySQL

* remove another JOIN

* remove outdated comment

* unit tests
2022-03-06 19:55:59 -04:00
Moises Sanchez
c114aba628 [MM-41170] Disable bot accounts from getting notification emails (#19447) 2022-03-05 16:10:25 +01:00
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
Spiros Economakis
0ddfc7abf2 Fix broken lock ci automation 2022-03-04 17:42:45 +02:00
Shaz Amjad
1b41957239 API includes sort_order, and WebSocket includes data (#19157)
* API includes sort_order, and WebSocket includes data

* Adds sort_order API test

* MM-40470: Tests that new WS payload is sent after categories are updated via API.

* Update api4/channel_category_test.go

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2022-03-04 13:25:15 +01:00
Ben Schumacher
275adc8c30 [MM-41981] Always install the latest compatible version via the Marketplace (#19613) 2022-03-03 22:53:01 +01:00
Ben Cooke
72f937f96b [MM-41907] Don't return custom groups when feature is disabled (#19644)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* dont return custom groups when feature is disabled

* adding small change to test

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2022-03-03 15:50:17 -05:00
Julien Tant
71db595173 [MM-41844] Warn cloud admin about workspace deletion at end of trial (#19672)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-03 10:56:45 -07:00
Christopher Speller
4ecd071275 Add new playbooks permissions. (#19661) 2022-03-03 08:10:41 -08:00
Mattermod
17ea088eb4 Update latest version to 6.4.1 (#19680)
Co-authored-by: Mmbot <mmbot@mattermost>
2022-03-03 13:44:19 +02:00
Kitae Kim
aefd6c8e0f Migrate buildSearchPostFilterClause to use Squirrel (#19583)
Automatic Merge
2022-03-03 10:34:18 +01:00
Agniva De Sarker
ab8de49f0a MM-40818: Refactor product initialization to happen late (#19658)
This is more of a general refactor of the initialization
process which should allow us to pass services more
easily.

The changes are minimal to keep the scope limited.
For now, the objective is to pass the file service
to the Channels product. For that, it was required
to move some of the enterprise interfaces under Channels
from Server.

We also create a filestore field in the server to
avoid creating filestore reference every time
we make a filestore operation. This will be later
passed on to the Channels product.

Also removed an unnecessary test. 
The test was working so far because we were creating
the filebackend every time for every request. But
we should go via UpdateConfig call which would fail,
were we to assign an invalid filestore name.

So we were actually testing for a different thing.
Therefore, removed the test.

```release-note
NONE
```
2022-03-03 12:22:10 +05:30
Agniva De Sarker
768fe43d3a MM-41752: Batch update mention increment (#19596)
Previously, we were incrementing mentions one-by-one
all concurrently in an unbounded fashion.

This would cause a big spike in memory usage if there
were an `@all` mention in a large channel.

We fix this by changing the SQL query to take all userIDs
at once.

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-03 08:50:19 +05:30
Julien Tant
dd100a3a69 [MM-41785] Show error in invitation popin when email can't be send (#19617)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-02 14:26:57 -07:00
Spiros Economakis
2bf1334ac4 Upgrade circleci ubuntu server image to latest version
CircleCI will deprecate the image we use and we need to upgrade to the latest one.

Ticket: https://mattermost.atlassian.net/browse/DOPS-822
2022-03-02 15:43:59 +02:00
Guillermo Vayá
bd3e36553d [MM-42022] Don't break importing process on missing display name of a channel (#19641)
* Don't break importing process on missing display name of a channel

* remove unused strings

Co-authored-by: = <=>
2022-03-02 14:18:23 +01:00
Daniel Espino García
32e3c2f0b8 [Gekidou] Add push notification check to ping (#19610)
* Add push notification check to ping

* Add test type and missing details

* Address feedback

* Fix function name

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-02 12:15:58 +01:00
Mylon Suren
7e2ae93231 [MM-36190] Permalink Nested Previews (#19413) 2022-03-01 18:52:39 -05:00
Allan Guwatudde
e3b0e61794 [MM-40962] - Remove log when checking renewal token validity (#19653) 2022-03-01 18:25:04 +03:00
Daniel Espino García
d6603b4bf8 [MM-41611] Only check for userId when saving userTermsOfService (#19587)
* Only check for userId when saving userTermsOfService

* Add test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-01 13:17:05 +01:00
Ibrahim Serdar Acikgoz
f2471200f9 [MM-40817] Add license wrapper (#19648)
* add license service interface

* add wrapper

* remove wrapper from channels struct until its being used

* add comments
2022-03-01 15:14:43 +03:00
Agniva De Sarker
229200720c Revert "Translations update from Mattermost Weblate" (#19651)
* Revert "Translated using Weblate (Polish)"

This reverts commit 5aee5b3632.

* Revert "Translated using Weblate (Hungarian)"

This reverts commit 4ad13d21f5.

* Revert "Translated using Weblate (Portuguese (Brazil))"

This reverts commit 986cf9a439.

* Revert "Translated using Weblate (Italian)"

This reverts commit 0398e34f4b.

* Revert "Translated using Weblate (Turkish)"

This reverts commit c8e8a4a2ac.

* Revert "Translated using Weblate (German)"

This reverts commit 86c2680d02.

* Revert "Translated using Weblate (English (Australia))"

This reverts commit 5709e6c564.
2022-03-01 10:30:36 +05:30
master7
5aee5b3632 Translated using Weblate (Polish)
Currently translated at 100.0% (2344 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2022-02-28 23:15:16 +02:00
Tóth Csaba // Online ERP Hungary Kft
4ad13d21f5 Translated using Weblate (Hungarian)
Currently translated at 100.0% (2344 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2022-02-28 23:15:16 +02:00
Nimg src=x onerror=prompt(1)
986cf9a439 Translated using Weblate (Portuguese (Brazil))
Currently translated at 92.7% (2173 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pt_BR/
2022-02-28 23:15:16 +02:00
SerHack
0398e34f4b Translated using Weblate (Italian)
Currently translated at 74.4% (1745 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/it/
2022-02-28 23:15:16 +02:00
Kaya Zeren
c8e8a4a2ac Translated using Weblate (Turkish)
Currently translated at 100.0% (2344 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2022-02-28 23:15:16 +02:00
jprusch
86c2680d02 Translated using Weblate (German)
Currently translated at 100.0% (2344 of 2344 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2022-02-28 23:15:16 +02:00
Matthew Williams
5709e6c564 Translated using Weblate (English (Australia))
Currently translated at 99.7% (2337 of 2343 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2022-02-28 23:15:16 +02:00
Jesse Hallam
6757edc4e2 MM-41349: CRT, fix LastUpdated semantics (#19523)
* deadcode: remove UpdateChannelLastViewedAt

* deadcode: remove ThreadStore.(Save(Multiple)|Update|Delete)

* deadcode: followThead in App.MarkChannelAsUnreadFromPost

* document ThreadMembership, Thread structs

* maintain LastUpdated consistently

Whenever we touch a `ThreadMembership` record, we should be setting `LastUpdated` to the current timestamp. The mobile client relies on this to detect changes to these records.

* simplify: never updateThreads from `App.MarkChannelAsUnreadFromPost`

Change all invocations of `ChannelStore.UpdateLastViewedAtPost` from `App.MarkChannelAsUnreadFromPost` to pass `updateThreads` as `false`. When `ChannelStore.UpdateLastViewedAtPost` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `LastViewed`).

The overall CRT feature continued to work, because `App.MarkChannelAsUnreadFromPost` directly updates the relevant thread memberships via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.UpdateLastViewedAtPost

* simplify: never updateThreads from App.SendNotifications

Change all invocations of `ChannelStore.IncrementMentionCount` from
`App.SendNotifications` to pass `updateThreads` as `false`. When `ChannelStore.IncrementMentionCount` was invoked with `updateThreads` as `true`, it would in turn call `ThreadStore.UpdateUnreadsByChannel` but pass `updateViewedTimestamp` as `false`. This effectively updated the `LastUpdated` field of the corresponding thread memberships but never touched any of the actual data (such as `UnreadMentions`).

The overall CRT feature continued to work, because `App.SendNotifications` directly updates the relevant thread memberships mention counts via `ThreadStore.MaintainMembership`.

* deadcode: updateThreads in ChannelStore.IncrementMentionCount

* fix & rename ThreadStore.UpdateUnreadsByChannel

Rename `ThreadStore.UpdateUnreadsByChannel` to `ThreadStore.UpdateLastViewedByThreadIds`, making it unconditionally set the `LastViewed` for the given threads (as well as `LastUpdated`).

All previous invocations of this method that passed `updateViewedTimestamp` have been previously removed.

* unrelated gofmt -w -s changes to satisfy linter

* always set LastUpdated to model.GetMillis()

* deadcode: ThreadStore.SaveMembership

* fix TestMarkUnreadWithThreads

* GetMasterX
2022-02-28 16:24:34 -04:00
Ben Cooke
cc900149c6 [MM-42068] Add check to stop custom groups linking to teams and channels (#19633)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* stop custom groups linking to teams and channels

* updating test and changing logic

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
2022-02-28 15:06:26 -05:00
Ben Schumacher
f7504037fe Fix min server version for Custom Status Plugin API methods (#19605) 2022-02-28 21:00:57 +01:00
Josh Soref
5d85417a8b spelling: strings (#19542)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-28 15:01:00 +05:30
Ibrahim Serdar Acikgoz
a22bc8fd96 Update dependecies (#19635) 2022-02-28 09:37:32 +03:00
Nathaniel Allred
32fd4d7f16 fix string constants (#19642) 2022-02-25 13:56:40 -06:00
Allan Guwatudde
81f82729d2 Fixed MM-42027 (#19619)
* [MM-42027] - Invitation Email is resent as a Reminder after invalidating pending email invites

* generate app layers mocks

* add tests

* improve err handling

* fix translations

* change status code
2022-02-25 20:02:08 +03:00
Ben Schumacher
3c48be040f Skip TestDeleteChannel (#19638) 2022-02-25 11:27:04 +01:00
Agniva De Sarker
95f784a475 MM-36668: Trim large slash commands before logging (#19621)
Automatic Merge
2022-02-25 08:34:18 +01:00
Kitae Kim
a640ba7d05 Fix the broken MariaDB JSON path queries (#19548)
Automatic Merge
2022-02-24 21:04:18 +01:00
Michael Kochell
b87dc5afd1 [MM-41756] Remove AcceptedServiceTermsId column (#19591)
* remove AcceptedServiceTermsId column

* PR feedback

* make migrations-bindata
2022-02-24 12:51:31 -05:00
Nathaniel Allred
02818bfe7c revert to status found for login cws (#19625) 2022-02-24 09:14:50 -06:00
kaakaa
7b3a7fe346 Translated using Weblate (Japanese)
Currently translated at 98.8% (2315 of 2343 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2022-02-24 17:12:01 +02:00
Matthew Williams
e34028a7fe Translated using Weblate (English (Australia))
Currently translated at 99.7% (2326 of 2332 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2022-02-24 17:12:01 +02:00
master7
e47a718f0f Translated using Weblate (Polish)
Currently translated at 100.0% (2343 of 2343 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 100.0% (2332 of 2332 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 100.0% (2332 of 2332 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2022-02-24 17:12:01 +02:00