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

14427 Коммитов

Автор SHA1 Сообщение Дата
Weblate (bot)
90245d4679 Translations update from Mattermost Weblate (#19551)
* Translated using Weblate (Korean)

Currently translated at 84.4% (1968 of 2330 strings)

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

* Translated using Weblate (German)

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/de/

Translated using Weblate (German)

Currently translated at 100.0% (2331 of 2331 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% (2332 of 2332 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% (2332 of 2332 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% (2331 of 2331 strings)

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

* 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% (2331 of 2331 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% (2332 of 2332 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% (2331 of 2331 strings)

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

* Translated using Weblate (English (Australia))

Currently translated at 99.7% (2326 of 2331 strings)

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

* Translated using Weblate (German)

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/de/

Co-authored-by: Hojin Kim <hojink.kim@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: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
2022-02-14 20:30:02 +02:00
Jesús Espino
2c3e289509 Working on refactoring jobs service (#19205)
* Working on refactoring jobs service

* Making more consistent with the previous existing code

* Remove no longer needed functions

* Making a base PeridicScheduler to use it in most of the schedulers implementations

* Removing accidental complexity from on of the jobs

* Removing accidental complexity from expirynotify

* Fixing compilation from previous commit

* Remove accidental complexity from the export_delete job

* Simplifying the workers by making a reusable worker

* Using simple worker for export_delete job

* Simpliying export process job

* Simpliying extract content job

* Simpliying import delete job

* Simpliying import process job

* Simpliying product noticies job

* Simpliying fix crt channel unreads job (only removing the uneeded register function)

* Simpliying migrations job (only removing the uneeded register function)

* fixup

* Simpliying plugins job (only removing the uneeded register function)

* Simpliying bleve indexing job (only removing the uneeded register function)

* Simpliying resend invitation email job (only removing the uneeded register function)

* Fixing tests

* Simplifying migration tests infrastructure

* Adding missed license to files

* Adding an empty file to imports package to ensure this package exist even without enterprise repo

* Regenerating einterfaces mocks

* Adding missed license to files

* Updating i18n/en.json file

* help fixing enterprise tests compilation

* Adding new DailyScheduler

* Fixing typo and changing the waitTime type for periodic sechduler

* Making the daily scheduler more generic

* Adding comments to clarify not used parameters in interface scheduler interface implementations

* Using merror to handle multiple errors in jobs workers

* Fixing linter errors

* Addressing PR review comments

* Reverting go.tools.mod changes

* Removing the static check for worker type in the model (moving it to the insertion of new jobs

* Moving migrations job to the jobs directory

* Fixing (and improving a bit) tests

* Apply suggestions from code review

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* Fixing enterprise tests

* Removing unneeded InitWorkers/InitSchedulers calls

* Fix expirenotify job when error happens

* Fixing govet errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-02-14 18:21:18 +01:00
mkraft
7398451030 MM-41211: Adds ability to set SessionLengthSSOInDays to a decimal. (#19396)
* MM-41211: Accepts a decimal for the SSO session length.

* MM-41211: Fixes test and logic error.

* MM-41211: Validates session length is minimum 1 hour.

* MM-41211: Tricking the CI to allow an empty string.

* Fixes a test error and some lint changes.

* Fix error.

* Reverting IDE change.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-14 12:06:47 -05:00
Agniva De Sarker
10c8c84704 MM-41796: Sentry crash: use the correct error variable (#19547)
We use the correct error variable while checking
for the error

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

```release-note
NONE
```
2022-02-14 19:49:26 +05:30
Agniva De Sarker
59245a6d33 MM-41797: Skip Flaky test in ThreadStore (#19546)
https://mattermost.atlassian.net/browse/MM-41797

```release-note
NONE
```
2022-02-14 19:47:24 +05:30
Scott Bishel
9dcd61c124 prepackage focalboard v0.14.0 (#19518)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-11 10:53:16 -08:00
Kitae Kim
ff288b488c [GH-19150] Remove strings in all channel types for constants (#19535)
Automatic Merge
2022-02-11 12:04:18 +02:00
Josh Soref
0a17a9a6d8 spelling: strings (#19379)
Automatic Merge
2022-02-11 11:04:18 +02:00
Agniva De Sarker
446306a274 MM-38419: Split UPSERT statement into 2 (#19536)
The UPSERT statement was taking unexplained gap
locks, due to which the import was somehow failing.
I still don't know exactly how this is happening.

But splitting the UPSERT into 2 different statements
in the same transaction changes the locking semantics,
and avoids the deadlock.

Naturally, this proves that even our retrylayer
is sometimes ineffective against some problems.

```release-note
NONE
```
2022-02-11 13:54:47 +05:30
Agniva De Sarker
01a3ed0d3e MM-41143: Pass a custom logger to morph (#19530)
We create a custom io.Writer to pass to the logger
instance. For now, we keep everything to debug
as all errors are surfaced back to the server via
the API.

```release-note
NONE
```
2022-02-11 12:37:41 +05:30
Agniva De Sarker
3f52bd197a GraphQL (part 2): Model changes and resolvers (#19486)
This PR adds the necessary resolvers to support
the graphQL front-end. Some additional methods
need to be added to the model structs to support
this. Comments have been made to clarify their purpose.

There is a slight duplication of code in the api layer.
But eventually that's going to go away when we move
away from the REST API entirely.

The schema is in api4/schema.graphqls and gets compiled
into the binary as an asset.

The GraphiQL editor url is at GET /api/v5/graphql.

Everything is behind the feature flag MM_FEATUREFLAGS_GRAPHQL.

```release-note
NONE
```
2022-02-11 12:37:05 +05:30
Ben Cooke
88968f9e17 Growth spike guest accounts (#19437)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new endpoint to get users that should potentially be guests

* checking authservice to ensure they were an email signup

* adding tests for new endpoint

* fixing translation issue

* permissions for new endpoint

* fixing tests

* fixing when domain array is empty

* fixing when domain array is empty

* removing bots from request

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: mkraft <martinkraft@gmail.com>
2022-02-10 15:36:14 -05:00
Spiros Economakis
7ebe432fd0 prepare for next 6.5.0 (#19502) 2022-02-10 14:43:59 +01:00
Ben Schumacher
0d67995eb4 [MM-41200] Add OnSendDailyTelemetry() plugin hook (#19387) 2022-02-10 06:20:00 +01:00
Penthaa Patel
7c9708ef49 [MM-39629] - Migrate from gorp to sqlx in store/sqlstore/thread_store.go (#19094)
Automatic Merge
2022-02-10 06:04:18 +02:00
Julien Tant
c4dcf116c4 [MM-41408] Remove autotour feature flag (#19495) 2022-02-09 14:05:25 -07:00
Kyriakos Z
457aeb8e7e MM-36589: provide previous values for unreads (#18492)
* MM-36589: provide previous values for unreads

To successfully figure out the new counts of mentions or unread replies
for CRT we need to provide previous values alongside with the new.
This is needed so we'll know how many to subtract from the total.

This commit provides those numbers upon publishing websocket ThreadUpdated
and ThreadReadChanged events.

* Fixes errors

* Removes unneeded lines

* Adds GetThreadUnreadReplyCount store method

Uses the new store method to get unread replies instead of
GetThreadForUser.

* Tests, and some changes

- Adds api4 tests to test ws events
- Uses sqlx instead of gorp for new store method
- Fixes case where previous_unread_replies could be a negative value

* Refactors tests and adds more cases

* Fixes previous and current unread counts for commenter

When a user posts a reply to a thread the unread counts had a couple of
issues.
UnreadMentions where not zeroed out, and previous unread counts where
not set correctly.

This commit tries to fix that by marking the thread as read for the
current poster after we set previous unread counts to the websocket
event data.

Also MaintainMembership should zero out UnreadMentions when we are
setting the thread as read.

* Oops

* Fixes tests by updating when maintaining membership

OK, so some tests broke because we zero UnreadMentions in the membership
when we UpdateViewedTimestamp, since the new timestamp is always now.

Some tests broke because MaintainMembership for the commenter so that
the thread is read each time commenter posts moved further down in the
SendNotification method.

BOTH those test cases are fixed with this commit. To be sincere though I
don't understand why the second one is fixed by this.

* SystemAdminUser was not part of the channel

Some tests are failing because SystemAdminUser is not part of the
team and channels.
This commit adds user to team and channels, in an effort to fix
api4/user_tests

* Fixes tests

* Fixes tests

* Addresses review comments

* Fix if clause

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-09 15:41:30 -05:00
Ben Schumacher
6dab9eadf8 [MM-40935] Add OnInstall() plugin hook (#19499) 2022-02-09 20:29:00 +01:00
Agniva De Sarker
2d986ef920 Migrate Channelstore categories to sqlx (#19506)
Remove db:"-" tags from model.Channel as well.

```release-note
NONE
```
2022-02-09 23:09:42 +05:30
Agniva De Sarker
57eafbc6ca MM-40676: Bump dependencies (#19525)
https://mattermost.atlassian.net/browse/MM-40676

```release-note
NONE
```
2022-02-09 23:05:16 +05:30
Kirill Krotov
440790dad6 [MM-39631] mirgate user store to sqlx (#19403)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-09 19:56:16 +05:30
Agniva De Sarker
d5b24e383d Migrate ChannelStore.UpdateLastViewedAt to squirrel (#19439)
Fixes https://github.com/mattermost/mattermost-server/issues/19332

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-09 19:21:47 +05:30
Cass C
de0d95f72b MM-41035: Pre-package Playbooks v1.24.1 (#19443)
* MM-41035: Pre-package Playbooks v1.24.0

* bump minor version
2022-02-08 15:05:23 -05:00
Allan Guwatudde
e27099ec03 [MM-41534] - Portal not picking up MMCLOUDURL cookie (#19515) 2022-02-08 20:07:16 +03:00
Gabe Jackson
03d059bd2a Skip and warn on emoji import when name conflicts with system emoji (#19516)
This changes import behavior related to emoji imports when the name
conflicts with the name of a system emoji. Previously, the import
would fail, but now a warning is logged and the conflicting emoji
is skipped.
2022-02-08 10:20:34 -05:00
Carlos Panato
40f48432a6 Translated using Weblate (French)
Currently translated at 95.1% (2216 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/
2022-02-08 10:04:38 +01:00
Tom De Moor
26e20c2450 Translated using Weblate (Dutch)
Currently translated at 99.8% (2327 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/
2022-02-08 10:04:38 +01:00
EragonRD
cabd88f4cb Translated using Weblate (French)
Currently translated at 95.1% (2216 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/
2022-02-08 10:04:38 +01:00
kaakaa
ae3b96b4bd Translated using Weblate (Japanese)
Currently translated at 99.7% (2324 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
2022-02-08 10:04:38 +01:00
YEE
294ffab9aa Translated using Weblate (Korean)
Currently translated at 83.5% (1946 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/
2022-02-08 10:04:38 +01:00
master7
0096f7b487 Translated using Weblate (Polish)
Currently translated at 100.0% (2330 of 2330 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/pl/
2022-02-08 10:04:38 +01:00
Hosted Weblate
f71e9c691b 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/
2022-02-08 10:04:38 +01:00
Kaya Zeren
ddf3f659ce Translated using Weblate (Turkish)
Currently translated at 100.0% (2331 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
2022-02-08 10:04:38 +01:00
yeongeun.seo
6575672d4f Translated using Weblate (Korean)
Currently translated at 83.4% (1945 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/
2022-02-08 10:04:38 +01:00
Matthew Williams
096376d3b6 Translated using Weblate (English (Australia))
Currently translated at 99.7% (2326 of 2331 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
2022-02-08 10:04:38 +01:00
JtheBAB
4dfe356267 Translated using Weblate (German)
Currently translated at 100.0% (2331 of 2331 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% (2329 of 2329 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
2022-02-08 10:04:38 +01:00
MArtin Johnson
c5ce03ac59 Translated using Weblate (Swedish)
Currently translated at 99.7% (2325 of 2330 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.7% (2324 of 2329 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/sv/
2022-02-08 10:04:38 +01:00
Tóth Csaba // Online ERP Hungary Kft
853b81193d Translated using Weblate (Hungarian)
Currently translated at 100.0% (2331 of 2331 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% (2329 of 2329 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% (2324 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
2022-02-08 10:04:38 +01:00
Ji-Hyeon Gim
603f72177c Translated using Weblate (Korean)
Currently translated at 83.6% (1944 of 2324 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ko/
2022-02-08 10:04:38 +01:00
Agniva De Sarker
6605300c66 MM-41085: Use a counting semaphore in sendNotifications (#19498)
We throttle the concurrency limit in maintaining thread membership
for a given thread using a counting semaphore. The limit is currently
8 which is a decent number to start with.

On some more thinking, it would be even better if the sql query
could be modified to support batch updates.

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

```release-note
NONE
```
2022-02-08 12:20:02 +05:30
Agniva De Sarker
569ee94116 Pin GolangCI to a specific version (#19505)
* Pin GolangCI to a specific version

Go 1.16+ allows installing a tool directly from a specific version.
Therefore, we don't need to rely on the tool being pre-installed
and can directly install it using standard method.

This keeps the same version of the tool for a repo and limits the
binary placement to the GOBIN of the repo.

```release-note
NONE
```
2022-02-07 23:37:04 +05:30
Gabe Jackson
ca8eb1347b Skip exporting channels for deleted teams (#19494)
This corrects a bug where exports that contained deleted teams
could fail to import. Channels must be skipped that belong to these
deleted teams in order to produce a valid import bundle.
2022-02-07 12:24:50 -05:00
Julien Tant
d2cabaebab [MM-41343] Password reset must be 24hour (#19484) 2022-02-05 13:52:34 -07:00
Spiros Economakis
5fa8499602 Update database to v6.4.0 (#19500) 2022-02-04 15:34:10 +02:00
Ben Cooke
09e13360c2 Feature Flag for health of server dashboard (#19454)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* new feature flag for health of server dashboard

* fixing comment

* changing ff name

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-03 13:28:22 -05:00
Agniva De Sarker
79d63193ac MM-41184: Remove /config/migrate API endpoint (#19418)
This was introduced to let the functionality happen
via mmctl, but it does not differentiate between
sysadmins vs people having physical access to machines.

Therefore, we remove it and only keep the local endpoint
accessible from mmctl --local.

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

```release-note
The api/v4/config/migrate API endpoint has been removed
in favor of the mmctl --local endpoint. API clients
won't be able to access this endpoint without having
physical access to the server.
```
2022-02-03 14:38:08 +05:30
Shivashis Padhi
4ebf0df545 [MM-40582] Send unsanitized user to source on user_updated (#19444)
- feat: On user_updated event, send unsanitized user to event source and send sanitized event to other users
 - tests: Add tests for user_updated event changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-03 11:28:01 +05:30
Ben Schumacher
321b19e3db [MM-41290] Add Endpoint to complete onboarding (#19435) 2022-02-02 19:45:09 +01:00
Agniva De Sarker
a733fb840d GraphQL (part 1): Store layer (#19465)
We add the necessary store methods to use GraphQL

```release-note
NONE
```
2022-02-02 22:44:22 +05:30
Jesús Espino
e9a777f4e2 Temporary disabling .pages indexing to avoid crashes on malicious files (#19436)
Automatic Merge
2022-02-02 18:34:18 +02:00