Commit Graph

13579 Commits

Author SHA1 Message Date
Eli Yukelzon
fc0dbe0ace MM-35206 CRT: is_following on posts not reflecting state properly (#17533)
* forgot to copy isFollowing param

* /thread API didn't return thread posts, just the root

* cleanup

* [ci]

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-29 13:58:19 +02:00
Eli Yukelzon
611e03de94 MM-35300 CRT: No mention badge on Threads when user is mentioned in both the root post and a reply post (#17541) 2021-04-29 13:59:38 +03:00
Eli Yukelzon
861745e33b MM-35123 - CRT: Replying to a post with mention causes two mention badges to appear (#17506)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-29 12:15:27 +03:00
Eli Yukelzon
29341b8fe5 MM-35290 CRT: Reply on a unfollowed thread causes re-following (#17537) 2021-04-29 10:52:29 +03:00
Claudio Costa
d1e38fa74b [MM-35222] Fix DoGuestRolesCreationMigration (#17523)
* Set guest role based on scope

* Fix team scheme

* Fix scope
2021-04-29 09:13:42 +02:00
Harrison Healey
3c162999a5 MM-22678 Use more user-friendly errors for channel commands (#17520)
* MM-22678 Use more user-friendly errors for channel commands

* Update text from ticket

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-28 15:01:44 -04:00
Claudio Costa
6af032d06a [MM-35077] Add basic support for plugin intra-cluster communication (#17495)
* Add basic support for plugin intra-cluster communication

* Some renaming for added clarity

* Allow sending cluster event to specific nodes

* Improve naming and documentation

* Improve logging
2021-04-28 19:59:32 +02:00
Carlos Tadeu Panato Junior
7dc1718c1d bump golangci-lint to 1.39.0 (#17538) 2021-04-28 18:00:07 +02:00
Doug Lauder
12dbf0f527 MM-35181 Move SharedChannelsUsers.ChannelId column add to 5.36 migration (#17518)
* add 5.36 migration
2021-04-28 16:46:10 +02:00
Haardik Dharma
ccc7365ac3 Bump golangci version to v1.38.0 (#17154)
* Update golangci to v1.38.0

Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-28 16:43:41 +02:00
Agniva De Sarker
2d0f5f910a MM-35239: Fix racy test HubSessionRevokeRace (#17534)
Automatic Merge
2021-04-28 11:36:05 +02:00
Harshil Sharma
79dd9b13dc MM-18818 Prompt admins to set the Support Email (#17296)
* MM-18818 Set default support to empty and handled the same in email templates

* #MM-18818 Admin advisor now warns for inconfigured support email address

* Updated text

* #MM-18818 gofmt'ed files

* #MM-18818 updated text and removed unused i18n strings:

* #MM-18818 updated i18n string ordering

* #MM-18818 Added test for support email advisory

* MM-18818 gofmt'd the file

* MM-18818 separated contextual notifications from configuration notifications in Admin Advisor

* #MM-18818 prevented support email with whitepsaces from being detected as filled

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-28 12:05:38 +05:30
Ben Schumacher
dc7a425e77 [MM-34918] Update prepackaged version of autolink and GitHub (#17465) 2021-04-28 08:29:55 +02:00
Martin Kraft
49178bf480 MM-24455: Fix role responses. (#17385)
Automatic Merge
2021-04-27 18:36:05 +02:00
Christopher Speller
684cd93755 MM-34674 Adding config telemetry for feature flags. (#17456)
* Adding config telemetry for feature flags.

* Review fixes.
2021-04-27 08:58:38 -07:00
Eli Yukelzon
d819eb224c MM-35103 Replies in a thread with an initial mention triggers notification each time (#17503)
* only process parent post mentions for threads in order to autofollow

* don't use merge since it modifies the original

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-27 18:23:01 +03:00
Agniva De Sarker
978d886e3f MM-35239: Skip TestHubSessionRevokeRace (#17524)
https://mattermost.atlassian.net/browse/MM-35239

```release-note
NONE
```
2021-04-27 20:49:17 +05:30
Jesús Espino
757ea36211 Fix file info index batch (#17525) 2021-04-27 17:18:57 +02:00
Eli Yukelzon
3d6e69b002 MM-35128 CRT: Global Threads item should not be affected by 'mark as unread' in channel (#17505)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-27 16:56:06 +03:00
Eli Yukelzon
89281c00b1 MM-35127 CRT: Marking thread as unread doesn't set the timestamp correctly (#17507)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-27 15:48:43 +03:00
Carlos Tadeu Panato Junior
f73c77611f update pr template (#17480) 2021-04-27 10:30:48 +02:00
Eli Yukelzon
ba302cf512 MM-35125 CRT: Mention badge on threads doesn't appear until refresh (#17504) 2021-04-27 10:18:20 +03:00
Agniva De Sarker
cd4d322e4a MM-32950: Reliable WebSockets: Basic single server (#17406)
* MM-32950: Reliable WebSockets: Basic single server

This PR adds reliable websocket support for a single server.

Below is a brief overview of the three states of a connection:

Normal:
- All messages are routed via web hub.
- Each web conn has a send queue to which it gets pushed.
- A message gets pulled from the queue, and before it
gets written to the wire, it is added to the dead queue.

Disconnect:
- Hub Unregister gets called, where the connection is just
marked as inactive. And new messages keep getting pushed
to the send queue.

If it gets full, the channel is closed and the conn gets removed
from conn index.

Reconnect:
- We query the hub for the connection ID, and get back the
queues.
- We construct a WebConn reusing the old queues, or a fresh one
depending on whether the connection ID was found or not.
- Now there is a tricky bit here which needs to be carefully processed.
On register, we would always send the hello message in the send queue.
But we cannot do that now because the send queue might already have messages.

Therefore, we don't send the hello message from web hub, if we reuse a connection.

Instead, we move that logic to the web conn write pump. We check if
the sequence number is in dead queue, and if it is, then we drain
the dead queue, and start consuming from the active queue.
No hello message is sent here.

But if the message does not exist in the dead queue, and the sequence number
is actually something that should have existed, then we set
a new connction id and clear the dead queue, and send a hello message.
The client, on receiving a new connection id will automatically
set its sequence number to 0, and make the sync API calls to manage
any lost data.

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

```release-note
NONE
```

* gofmt

* Add EnableReliableWebSockets to the client config

* Refactoring isInDeadQueue

* Passing index to drainDeadQueue

* refactoring webconn

* fix pointer

* review comments

* simplify hasMsgLoss

* safety comment

* fix test

* Trigger CI

* Trigger CI

Co-authored-by: Devin Binnie <devin.binnie@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-26 19:51:25 +05:30
Carlos Tadeu Panato Junior
b0279a432d Updates on CI (#17484)
* moving mattermost-ver and golangci out from the build step

* adjusting resource class and update image for check-mocks job
2021-04-26 16:17:52 +02:00
Weblate (bot)
0e0746df8b Translations update from Weblate (#17509)
* 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/

* 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 (Dutch)

Currently translated at 99.4% (2296 of 2309 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/

* Translated using Weblate (Dutch)

Currently translated at 99.4% (2296 of 2309 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/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2313 of 2313 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% (2308 of 2308 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% (2307 of 2307 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.5% (2299 of 2309 strings)

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

* Translated using Weblate (Romanian)

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

* 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 (Turkish)

Currently translated at 100.0% (2308 of 2308 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% (2308 of 2308 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% (2313 of 2313 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% (2308 of 2308 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.9% (2307 of 2308 strings)

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

* Translated using Weblate (Russian)

Currently translated at 99.8% (2305 of 2308 strings)

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

Co-authored-by: MArtin Johnson <martinjohnson@bahnhof.se>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Viorel-Cosmin Miron <cosmin@uhlhost.net>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Edward Smirnov <ed@microolap.com>
2021-04-26 11:01:14 +02:00
Allan Guwatudde
fd546cdff2 [MM-35039] - Send trial ended email (#17478)
* [MM-35039] - Send trial ended email

* Generations

* Use First name with fallback to username

* Use First name with fallback to username for trial ending email
2021-04-23 21:45:47 +03:00
Carlos Tadeu Panato Junior
246e4f9508 upgrade DB for 5.35 (#17488) 2021-04-23 15:28:01 +02:00
Max Erenberg
9cd50a4e22 [MM-33853] remove CSV row limit in compliance monitoring (#17185) 2021-04-23 09:19:13 -04:00
Doug Lauder
ff657bfdef sync profile images (#17375)
support for synchronizing user's profile image for shared channels.
2021-04-22 17:48:09 -04:00
Jesús Espino
7c7c4716e6 Improving doc extraction command (#17482)
Automatic Merge
2021-04-22 16:36:04 +02:00
Eli Yukelzon
8c453bbcca MM-34895 CRT: Replying to a root post with an at-mention triggers an unread mention (#17474)
* don't count your own replies as unread

* corrected totalUnreadThreads query
2021-04-22 16:30:43 +03:00
Allan Guwatudde
0b2c0832f1 [MM-33662] - Mock out CWS in enterprise code (#17305)
* [MM-33662] - Mock out CWS in enterprise code

* Feedback impl

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-22 15:25:56 +03:00
Ibrahim Serdar Acikgoz
5f9870ac06 [MM-34216] app/import: do not break import process if a dm channel is invalid (#17391)
* app/import: do not break import process if a dm channel is invalid

* update test headers

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-22 12:42:22 +03:00
darkLord19
f6505e1ee6 MM-31339: Send only one direct message reply within one calendar day. (#17181)
* don't send auto response if already responded today

* update query to get posts from channel for given user and Updatetime requires value in milli seconds

* regenerate mocks and layers

* update function to return true/false on existence of auto responded post in channel and add tests

* add store tests

* bubble up error and propagate upstream

* fix error handling logic

* use require instead of assert

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

* rename variable for better redability and logging fixes

* update comment explaining function

* use new function to generate test ids

* add comments to clarify NewTestId copies

* add translations for error id

* fix translation

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
2021-04-22 12:33:45 +08:00
Ben Schumacher
f14b0097dd [MM-34798] Respect MM_SERVER_PATH when looking for templates (#17410) 2021-04-21 20:35:57 +02:00
Hossein
a1a8f00957 [MM-34838] Remove Ancillary Permissions That Are Purposefully Being Removed (#17466)
* remove ancillary permissions

* Start writing tests

* Move Ancillary Permissions to FrontEnd

* remove function

* remove test

* clean up

* fix comment

* Update api4/permission.go

Co-authored-by: Martin Kraft <martinkraft@gmail.com>

* Update api4/permission.go

* Update api4/permission.go

* license info

* Add Tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Martin Kraft <martinkraft@gmail.com>
2021-04-21 11:35:47 -04:00
Ibrahim Serdar Acikgoz
28ff4dc8d0 [MM-32281] SqlRoleStore/GetByName: add context to allow read from master (#17176)
* role_store/GetByName: add context

* propagate context in the app layer

* propagate context in the app layer

* add missing import

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-21 18:01:02 +03:00
Chetanya Kandhari
9eceeaa8db Custom status fixes (#17122)
* Changed the request type to POST for the remove recent custom status API

Fixed the custom status clear slash command

* Added Delete method in the remove recent custom status endpoint

* Added one new endpoint to remove recent custom status with POST method

* Added comments for the recent custom status API

Co-authored-by: Manoj <manoj@brightscout.com>
Co-authored-by: Chetanya Kandhari <availchet@gmail.com>
Co-authored-by: Manoj <77336594+manojosh@users.noreply.github.com>
2021-04-21 11:37:17 +03:00
Jesús Espino
bf542ec12f Fix performance problem on document extraction (#17470) 2021-04-21 10:29:52 +02:00
Eli Yukelzon
dd9a1918e1 MM-34872 CRT: thread last_viewed_at updated when channel is viewed (#17448) 2021-04-21 09:48:59 +03:00
Eli Yukelzon
56198a99c6 MM-34871 CRT: Participants of thread include non-replying followers (and past followers) (#17447)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-21 09:48:30 +03:00
Agniva De Sarker
321645696d MM-31717: Remove HTTP clustering (#17409)
* MM-31717: Remove HTTP clustering

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

```release-note
Gossip clustering mode is now GA and is no longer
available as a choice now. All cluster traffic will always
use the gossip protocol.

The config setting UseExperimentalGossip has no effect
and has only been kept for compatibility purposes.

The setting to use gossip has been removed from admin console.

Upgrade note:
If an existing system is not using gossip, then one cannot
upgrade one node in a cluster and keep the other one to the older
version, if an HA upgrade is intended. All nodes
in the cluster must use a single protocol.

Either the customer must use gossip if they want to do an HA
upgrade. Or, shut down all nodes and bring up all of them
after doing an upgrade.
```

* Trigger CI

* update translations
2021-04-21 10:33:31 +05:30
Max Erenberg
f36f5c74b1 Mm 30807 granular data retention scaffold (#17464) 2021-04-20 13:16:40 -04:00
Jesús Espino
368b642105 Fixing problem with read-replica on indexing files (#17460) 2021-04-20 12:30:43 +02:00
Agniva De Sarker
4295a1f556 MM-34125: Remove WebSocketDelay feature flag (#17441)
It has been soaked for enough time in community-daily
and also in community. Enabling it for all.

```release-note
TCP_NO_DELAY is disabled for websocket connections
to allow for higher throughput
```

https://mattermost.atlassian.net/browse/MM-34125
2021-04-20 10:10:22 +05:30
Harshil Sharma
a16fdb5001 #MM-34893 Completely disabled Admin Advisor (#17422)
* #MM-34893 Completely disabled Admin Advisor

* #MM-34893 added lint fixes
2021-04-20 05:43:01 +05:30
Claudio Costa
3984381011 [MM-13799] Avoid queries timing out during upgrade (#17444)
* Avoid timing out during upgrade

* Update gorp dep

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-19 20:34:21 +02:00
Hossein
93c8c6e9d8 Remove the Remove System Permissions (#17401)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-19 12:44:14 -04:00
Jesús Espino
d2ed053b6b Add doc extraction dependencies (#17403)
Automatic Merge
2021-04-19 18:06:05 +02:00
Agniva De Sarker
0e0f3f8c2e MM-34983: Remove check for number of data sources (#17431)
In case of Aurora databases, a single endpoint
might load balance between multiple replicas.
In that case, this check is incorrect. Therefore,
we remove it

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

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-04-19 20:30:17 +05:30