Commit Graph

17386 Commits

Author SHA1 Message Date
M-ZubairAhmed
bc11b29807
Replace Gfycat with GIPHY in emoji/gif picker (#24236)
* Added the package

* design

* add styled-component alias

* add contrast ratio

* added the tab icon

* review comments

* rev comments

* key added

* key added

* trans

* Added giphy sdk test key for playwright tests config

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
2023-08-18 16:02:46 -04:00
Christopher Poile
8418eefb75
MM-52804 - Implement SendPushNotification plugin api method (#24273)
* add SendPushNotification plugin api method

* lint; add testing.Short bc of the sleep

* add interface and generated layers

* add fields to PluginPushNotification; generate mocks

* SendPushNotification -> SendPluginPushNotification; improved comments

* more comments; fix test

* send api.ctx
2023-08-18 13:05:26 -04:00
Christopher Poile
f13a531bca
MM-53924 - Implement NotificationWillBePushed plugin hook (#24263)
* add NotificationWillBePushed hook

* mocks

* use a struct for hook parameters; simplify number of parameters sent across RPC

* missing wg.Wait

* change to a bool return value
2023-08-18 12:01:50 -04:00
Andrey K
56a0becbca
[MM-32576] Text copied from Microsoft OneNote pastes as an image (v2) (#23530)
* [MM-32576] Text copied from Microsoft OneNote pastes as an image

* [MM-32576] Text copied from Microsoft OneNote pastes as an image (linter and tests fix)

* [MM-32576] Text copied from Microsoft OneNote pastes as an image (E2E tests fix: mock clipboardData.getData())

---------

Co-authored-by: Andrey Karavashkin <akaravashkin@stsoft.ru>
2023-08-18 07:37:58 -04:00
Christopher Poile
7b0b0d8609
MM-53764 - Fix: Improve limits on Opengraph Data Cache (#24177)
* enforce strict opengraph cache entry size limit

* move json marshalling and error checking into parsOpenGraphMetadata fn

* fix linting

* fix potential nil deref

* Revert "fix potential nil deref"

This reverts commit 095bcd496e.

* Revert "fix linting"

This reverts commit f3e1f7b276.

* Revert "move json marshalling and error checking into parsOpenGraphMetadata fn"

This reverts commit ba9a1e13b0.

* Revert "enforce strict opengraph cache entry size limit"

This reverts commit d1de4a8fa4.

* remove /opengraph api endpoint

* i18n

* removing unneeded action and reducer
2023-08-17 18:23:39 -04:00
Jesse Hallam
ad142c958e
MM-53355: install transitionally prepackaged plugins to filestore (#24225)
* move plugin signature verification to caller

The semantics for when plugin signature validation is required are unique to the caller, so move this logic there instead of masking it, thus simplifying some of the downstream code.

* support transitionally prepacked plugins

Transitionally prepackaged plugins are prepackaged plugins slated for unpackaging in some future release. Like prepackaged plugins, they automatically install or upgrade if the server is configured to enable that plugin, but unlike prepackaged plugins they don't add to the marketplace to allow for offline installs. In fact, if unlisted from the marketplace and not already enabled via `config.json`, a transitionally prepackaged plugin is essentially hidden.

To ensure a smooth transition in the future release when this plugin is no longer prepackaged at all, transitionally prepackaged plugins are persisted to the filestore as if they had been installed by the enduser. On the next restart, even while the plugin is still transitionally prepackaged, the version in the filestore will take priority. It remains possible for a transitionally prepackaged plugin to upgrade (and once again persist) if we ship a newer version before dropping it altogether.

Some complexity arises in a multi-server cluster, primarily because we don't want to deal with multiple servers writing the same object to the filestore. This is probably fine for S3, but has undefined semantics for regular filesystems, especially with some customers backing their files on any number of different fileshare technologies. To simplify the complexity, only the cluster leader persists transitionally prepackaged plugins.

Unfortunately, this too is complicated, since on upgrade to the first version with the transitionally prepackaged plugin, there is no guarantee that server will be the leader. In fact, as all nodes restart, there is no guarantee that any newly started server will start as the leader. So the persistence has to happen in a job-like fashion. The migration system might work, except we want the ability to run this repeatedly as we add to (or update) these transitionally prepackaged plugins. We also want to minimize the overhead required from the server to juggle any of this.

As a consequence, the persistence of transitionally prepackaged plugins occurs on every cluster leader change. Each server will try at most once to persist its collection of transitionally prepackaged plugins, and newly started servers will see the plugins in the filestore and skip this step altogether.

The current set of transitionally prepackaged plugins include the following, but this is expected to change:
* focalboard

* complete list of transitionally prepackaged plugins

* update plugin_install.go docs

* updated test plugins

* unit test transitionally prepackged plugins

* try restoring original working directory

* Apply suggestions from code review

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>

* clarify processPrepackagedPlugins comment

---------

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
2023-08-17 12:46:57 -03:00
Agniva De Sarker
7db5b473bb
MM-54158: S3PathMigration: Re-initialize stop chan (#24286)
This got missed out in the initial PR review.

There's been only one instance of this, and that too in a spinwick
so it's not widepsread. We will cp this if we see more crashes.

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

```release-note
NONE
```
2023-08-17 19:49:40 +05:30
Jesse Hallam
b814d76488
config-reset: -tags production (#24277)
Somewhere in the build pipeline, we run `make config-reset` to generate a default `config.json` to include with the tarball. Unfortunately, this was being built without the `-tags production` signal that changes the default service environment to `production`, and in turn caused the `CWS` environment to default to testing. The trial licenses returned by the testing environment aren't compatible with the production environment, preventing new customers from starting trials by themselves.

As an immmediate workaround, customers can simply delete the `config.json` included with the tarball and start the server anew. Without any further configuration, it will correctly default to the `production` service environment and use the correct `CWS` environment.

Fix the tarball generation by adding `-tags production` to the `config-reset` Makefile target. We don't add a dev version of this for now, as it's not really needed given the server creates the right value on startup.

Fixes: https://mattermost.atlassian.net/browse/CLD-6137
2023-08-17 11:16:16 -03:00
Nathan
44f3482fee
Trims whitespace from command arguments in RootCmd (#24218)
- Prevents commands from receiving potential whitespace characters
- Adds a new root test case ensuring various whitespace characters are removed

Co-authored-by: Nathan Geist <ngeist@spiria.com>
2023-08-17 10:19:09 +02:00
Daniel Espino García
7b164d4f82
Fix MM-53949 (#24237)
* Fix MM-53948

* Fix tests

* Fix missing layers
2023-08-16 10:17:52 -04:00
yasserfaraazkhan
6d54ed78dd
chore(e2e): Remove ReduceOnBoardingTaskList from e2e config (#24260) 2023-08-16 19:31:48 +05:30
Ibrahim Serdar Acikgoz
83652aa3c2
[MM-53840] Add migration workflow (#24211) 2023-08-16 10:09:11 +03:00
Agniva De Sarker
0e75982f2b
Improve websocket logging (#24259)
After reliable websockets were introduced,
we would keep pushing to a webConn even after
the client has disconnected. This would lead
to the websocket.slow/full and eventually
the disconnect messages which unnecessarily
confuse the admin.

We don't log them if the connection is inactive.

We use the active field and convert it to an atomic
to use more widely.

```release-note
NONE
```
2023-08-16 11:03:05 +05:30
David Janda
2ed0c6495b
[GH-16800]: Refactor raw SQL to query builder in group_store.go - part 1 (#24154)
* Update group_store.go

Replace raw SQL with query builder for Get, Update, and Delete methods in GroupStore

* Update group_store.go

Replace raw SQL with query builder for GetByRemoteID, GetAllBySource, and Restore methods in GroupStore

* Add error handling when using query builder in group_store.go

* Use builder methods to cut down on boilerplate

* Update server/channels/store/sqlstore/group_store.go

Implement suggestion from PR review

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

---------

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-16 09:28:03 +05:30
Daniel Espino García
4a4bf82440
Remove unused components (#24189)
* Remove unused components

* i18n-extract

* Fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-15 16:46:19 -04:00
Nitin Suresh
b19233d3e3
[MM-53699] : Remove channel header limit message when user adjusts to valid length (#24160)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-15 16:42:10 -04:00
Sinan Sonmez (Chaush)
39150bc16d
fix member count (#24233) 2023-08-15 16:41:20 -04:00
Ben Cooke
f64e6174e2
[MM-53556] Fix crash when you are added to a group that's not in state (#24196)
* fix webapp crashing when you get added to a group
2023-08-15 11:03:44 -04:00
Scott Bishel
faea229921
MM-53688 Remove boards dataretention (#24231)
* remove boards data-retention

* remove another variable

* update snapshots, to remove boards

* need to keep config settings until focalboard is updated

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-15 08:27:45 -06:00
Scott Bishel
5b48a712d1
MM-52910 - remove boards product tour code (#24223)
* remove boards product tour code

* remove another constant

* i18n-extract

* remove boards from onboarding flow

* remove unused import

* i19n-extract
2023-08-15 08:26:36 -06:00
MahmoudFarouq
4ef9384d74
remove redundant getUser call (#24198) 2023-08-15 13:56:05 +02:00
Harrison Healey
dec13f8c9c
MM-49063 Silence warning when lastViewedAt is undefined (#24252)
* MM-49063 Silence warning when lastViewedAt is undefined

* Fix type error
2023-08-14 17:41:22 -04:00
Yash Ajgaonkar
e211b867b8
Update cluster_handlers.go (#24238)
Remove unnecessary debug statements as a fix for MM-24226

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-14 20:16:30 +03:00
Hosted Weblate
d88e1e6650 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

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

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/
2023-08-14 18:41:15 +02:00
Guillermo Vayá
099b98c758 Translated using Weblate (Hungarian)
Currently translated at 88.6% (5007 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/hu/

Translated using Weblate (Turkish)

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/tr/
2023-08-14 18:41:15 +02:00
master7
e91900f401 Translated using Weblate (Polish)
Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/pl/

Translated using Weblate (Polish)

Currently translated at 99.3% (5610 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/pl/

Translated using Weblate (Polish)

Currently translated at 98.7% (5579 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/pl/
2023-08-14 18:41:15 +02:00
MArtin Johnson
daa1d841b2 Translated using Weblate (Swedish)
Currently translated at 100.0% (2465 of 2465 strings)

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

Translated using Weblate (Swedish)

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/sv/
2023-08-14 18:41:15 +02:00
Tom De Moor
b6bf16c08b Translated using Weblate (Dutch)
Currently translated at 99.9% (2464 of 2465 strings)

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

Translated using Weblate (Dutch)

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/nl/
2023-08-14 18:41:15 +02:00
Hosted Weblate
e231c4407e Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/
2023-08-14 18:41:15 +02:00
jprusch
c5891c5944 Translated using Weblate (German)
Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/de/
2023-08-14 18:41:15 +02:00
master7
c50e8b2ef6 Translated using Weblate (Polish)
Currently translated at 98.2% (5549 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/pl/
2023-08-14 18:41:15 +02:00
Tom De Moor
6670f23cab Translated using Weblate (Dutch)
Currently translated at 97.3% (5501 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/nl/
2023-08-14 18:41:15 +02:00
Kaya Zeren
ed6e5a6f3c Translated using Weblate (Turkish)
Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2465 of 2465 strings)

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/tr/
2023-08-14 18:41:15 +02:00
Matthew Williams
d008caa21f Translated using Weblate (English (Australia))
Currently translated at 99.9% (2464 of 2465 strings)

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

Translated using Weblate (English (Australia))

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/en_AU/
2023-08-14 18:41:15 +02:00
Konstantin
6c06e5a97e Translated using Weblate (Russian)
Currently translated at 100.0% (2465 of 2465 strings)

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

Translated using Weblate (Russian)

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/ru/
2023-08-14 18:41:15 +02:00
Hosted Weblate
42e10901d2 Update translation files
Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/
2023-08-14 18:41:15 +02:00
jprusch
5dd7a12648 Translated using Weblate (German)
Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/de/

Translated using Weblate (German)

Currently translated at 100.0% (2465 of 2465 strings)

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/de/
2023-08-14 18:41:15 +02:00
Konstantin
cb3616faf8 Translated using Weblate (Russian)
Currently translated at 99.2% (2447 of 2465 strings)

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

Translated using Weblate (Russian)

Currently translated at 100.0% (5648 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/ru/
2023-08-14 18:41:15 +02:00
CI-YU
896e6a3a11 Translated using Weblate (Chinese (Traditional))
Currently translated at 63.3% (3580 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/zh_Hant/
2023-08-14 18:41:15 +02:00
master7
c28c4918cc Translated using Weblate (Polish)
Currently translated at 100.0% (2465 of 2465 strings)

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/pl/

Translated using Weblate (Polish)

Currently translated at 97.4% (5503 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/pl/
2023-08-14 18:41:15 +02:00
Tom De Moor
746427584d Translated using Weblate (Dutch)
Currently translated at 97.3% (5499 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/nl/
2023-08-14 18:41:15 +02:00
Sharuru
2ee8dc0739 Translated using Weblate (Chinese (Simplified))
Currently translated at 79.4% (4485 of 5648 strings)

Translation: mattermost-languages-shipped/mattermost-webapp-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp-monorepo/zh_Hans/

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (2465 of 2465 strings)

Translation: mattermost-languages-shipped/mattermost-server-monorepo
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server-monorepo/zh_Hans/
2023-08-14 18:41:15 +02: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
5a349873f7
Class to functional component example 2 (#24183)
* Class to functional component example 2

* Fix tests
2023-08-14 14:20:47 +02:00
Daniel Espino García
1f525550a5
Migrate access history modal to functional component (#24210)
* Migrate access history modal to functional component

* Fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-14 14:20:07 +02:00
Saturnino Abril
a93a01fa8f
MM-54004 migrate HeaderFooterNotLoggedIn as functional component (#24244)
* chore: MM-54004 migrate HeaderFooterNotLoggedIn as functional component

* fix about and HA links
2023-08-14 06:48:19 -04: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
streamer45
82362dbde9
Update error id 2023-08-11 11:44:49 -06:00
streamer45
3e1cbae884
Implement ServeMetrics plugins hook 2023-08-11 11:34:12 -06:00
Daniel Espino García
c1c07ba1bb
Migrate components/post_view/post_flag_icon/post_flag_icon.tsx from class to function component (#24187)
* Class to functional example 3

* Address feedback

* Address feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-08-11 16:57:25 +02:00