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

19712 Коммитов

Автор SHA1 Сообщение Дата
Pablo Vélez
8b8d0a0a09 MM-61897 - fix duplicated role dialog in boostrap modals (#29507)
* MM-61897 - fix duplicated role dialog in modals

* fix linter
2024-12-13 15:07:58 -05:00
Seiya Homma
01415bee9c Resolve backward compatibility issues (#29566)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-13 12:49:00 -04:00
Antonis Stamatiou
9b67fb73c2 feat: Decouple reporting from actual testing (#29587)
* feat: Decouple reporting from actual testing

* fix: Added also PR number for comment

* feat: Add also mmctl publishing
2024-12-13 16:03:22 +02:00
Agniva De Sarker
42ff2a2639 [Aider assisted]: Templatize rest of the elasticsearch translation strings (#29582)
After https://github.com/mattermost/mattermost/pull/29209, there were some more
strings which were left out. Sending another PR to fix all of them.

The config validation strings are made generic for simplicity, because they
are called before the search backend is started, and even though you could
check for the config setting, it forces the code order. Therefore, changed
the words to just say "Search" for simplicity.

I tried to use Aider initially for a little while, but ended up fighting
a lot with the search/replace and having to repeat myself over and over again
to get it to do the refactoring. Eventually gave up and did rest of the changes
myself.

```release-note
NONE
```
2024-12-13 19:25:08 +05:30
Jesse Hallam
7179a9d1d6 reduce usage of Utils.localizeMessage (#29282)
* reduce usage of Utils.localizeMessage

As we begin to transition to react-intl's `formatjs` for extraction, our custom wrappers like `Utils.localizeMessage` prevent an adoption roadblock.

This is the first in a series of PRs to begin to migrate away in favour of:
* `useIntl` when inside React functional component
* use `injectIntl` and use access the `intl` prop from class components
* use the new `getIntl`, leveraging a memoized `createIntl` and the store outside of React components

I'm pausing in this effort to get a feel from peers on both the substance of these changes and best practices in supporting them.

* prefer shallowWithIntl, renderWithContext, and local injectIntl wrapping

* revert unintentional whitespaces

* clarify getIntl, add minor unit test

* avoid triggering mmjstool

* update e2e tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-13 09:49:28 -04:00
Agniva De Sarker
bc22267829 MM-61699: Improve TestDeletePostEvent (#29575)
This test failed because TestWebHubCloseConnOnDBFail failed
and therefore the ChannelMembers table failed to be
renamed back.

We can see that in the logs:

```
teams","request_id":"sdxjxsd1wibd9mb7kc3ixj6g1w","ip_addr":"127.0.0.1","user_id":"afw9qqjh7pnddqakraxnjf1oph","method":"POST","user_id":"afw9qqjh7pnddqakraxnjf1oph","team_id":"bocubwmn4jyrmc1p9uxrc4pwfc","error":"JoinDefaultChannels: Unable to save direct channel., channel_members_save: Error 1146 (42S02): Table 'dbrt3jzcosj3nb8g6mgwmqyss9rh.ChannelMembers' doesn't exist"}
{"timestamp":"2024-11-10 13:52:34.260 Z","level":"error","msg":"Error while invalidating channel member cache","caller":"platform/web_hub.go:524","user_id":"afw9qqjh7pnddqakraxnjf1oph","error":"failed to find ChannelMembers, TeamScheme and ChannelScheme data: Error 1146 (42S02): Table 'dbrt3jzcosj3nb8g6mgwmqyss9rh.ChannelMembers' doesn't exist"}
{"timestamp":"2024-11-10 13:52:34.260 Z","level":"error","msg":"Error while invalidating channel member cache","caller":"platform/web_hub.go:524","user_id":"afw9qqjh7pnddqakraxnjf1oph","error":"failed to find ChannelMembers, TeamScheme and ChannelScheme data: Error 1146 (42S02): Table 'dbrt3jzcosj3nb8g6mgwmqyss9rh.ChannelMembers' doesn't exist"}
```

There is nothing wrong with this test. And while
we are here, we slightly improve the for-select loop
to exit faster.

https://mattermost.atlassian.net/browse/MM-61699
```release-note
NONE
```
2024-12-13 13:28:58 +05:30
Claudio Costa
6e2c34bb6b Prepackage Calls v1.4.0 (#29568) 2024-12-12 14:34:59 -06:00
Jesús Espino
31351a48b0 Depublishing some app layer methods (#29559)
* Depublishing some app layer methods

* Fixing errors

* Addressing PR review comment

* Using goimports formatting now
2024-12-12 20:15:38 +01:00
Devin Binnie
c19e0ea0e7 [MM-61958] Always fetch team unreads for current team on reconnect (#29529) 2024-12-12 12:49:13 -05:00
Rohan Sharma
a5a92d825a [MM-61102] Fix errcheck issues in server/channels/app/channel_bookmark_test.go (#28789)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-12 16:48:48 +01:00
Devin Binnie
3eb95af974 [MM-62086] Don't include deleted DMs/GMs when returning archived channels (#29572) 2024-12-12 15:19:21 +00:00
Devin Binnie
57372bd06b [MM-62092] Allow system admins to pull posts in from DMs they're not in (#29557) 2024-12-12 15:12:21 +00:00
Antonis Stamatiou
b60ce28726 feat: Added also issues permissions (#29579) 2024-12-12 16:42:48 +02:00
Agniva De Sarker
d20dbc3b88 MM-61698: Fix TestWebHubCloseConnOnDBFail properly (#29577)
Finally I figured out why the log message for
/api/v4/websocket does not appear. It is because
the log gets generated only when the request returns,
and for websockets, the request doesn't return
until the client closes. And because we were closing
the client in a defer clause, the flushing of the logger
would happen before closing the client, therefore
leading to a race condition of the log not appearing
from time to time.

https://mattermost.atlassian.net/browse/MM-61698
```release-note
NONE
```
2024-12-12 18:55:44 +05:30
Ivy Gesare
832b5a3332 [MM-61771] Fix errcheck issues in server/channels/app/platform/service_test.go (#29375)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-12 13:51:16 +01:00
Seiya Homma
55500b573a [MM-61776] Fix errcheck issues in server/channels/app/platform/web_conn.go (#29515) 2024-12-12 12:19:23 +01:00
Wayne Wollesen
a58a7475bd Update schemes.yaml (#29502)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-12 12:19:09 +01:00
Kyrillos Isaac
267c4133b7 [MM-61263] fix: errcheck issues in server/channels/app/job_test.go (#29070)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-12 12:17:40 +01:00
Jesús Espino
b8efccae69 Migrate MM-53377 regression test from Cypress to Playwright (#29460)
* feat: Migrate MM-53377 regression test from Cypress to Playwright

* fix: Update mm_53377 regression test to use admin client for setup

* fix: Correct admin client usage in mm_53377 regression test

* refactor: Standardize mm_53377 Playwright test with consistent naming and imports

* fix: Mark MM-T53377 test as fixme for investigation

* Migrating mm_53377_regression_test_spec.js cypress test to playwright

* Fixing linter errors

* Addressing PR review comment

* Fixing broken test
2024-12-12 12:02:22 +01:00
AulakhHarsh
1b164c8302 Fix errcheck issues in server/channels/app/platform/service.go (#29366) 2024-12-12 11:22:57 +01:00
Jesús Espino
4e1e7334d8 Migrate remaining javascript files in webapp/channels/src/plugins to typescript (#29386)
* feat: Migrate actions.js to TypeScript with type annotations

* feat: Migrate actions.js to TypeScript with correct action types

* feat: Add actions plugin for webapp channels

* feat: Migrate actions.js to TypeScript with type annotations

* feat: Add interactive dialog plugin for webapp channels

* feat: Migrate interactive_dialog.js to TypeScript with type definitions

* feat: Add export plugin module for webapp channels

* feat: Migrate export.js to TypeScript with type declarations

* feat: Add initial plugin index file for webapp channels

* feat: migrate plugins/index.js to TypeScript with type definitions

* test: Add export plugin test file

* feat: Migrate export.test.js to TypeScript with type assertions

* feat: Add emoji actions file to webapp channels

* feat: Migrate emoji_actions.js to TypeScript with full type support

* Fixing some issues

* Revert "feat: Migrate emoji_actions.js to TypeScript with full type support"

This reverts commit e64aabe9fc6d36938cbaa40b7acb3356729a6686.

* fixing linter errors

* Fixing CI

* Addressing pr review comments

* Apply suggestions from code review

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>

* Fixing linter errors

* Fixing CI

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2024-12-12 10:03:13 +01:00
Agniva De Sarker
f3309633b2 MM-61698: Unskip TestWebHubCloseConnOnDBFail (#29546)
https://github.com/mattermost/mattermost/pull/29214 fixed the
race condition in web_hub initialization.

The failure in the test is strange because there's no log
for the websocket request. It's as if th.CreateWebSocketClientWithClient()
never got called at all.

I am re-arranging the lines so that even if it fails,
the table rename happens anyways. But overall, I don't see
any reason for the failure.

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

```release-note
NONE
```
2024-12-12 10:53:31 +05:30
Agniva De Sarker
bfdf6638ee Adding error context in license validation (#29554)
While investigating https://mattermost.atlassian.net/browse/MM-61529,
I noticed that we weren't adding the internal error which made
it impossible to understand what was really happening.

```release-note
NONE
```
2024-12-12 10:33:46 +05:30
Jesse Hallam
ec51e81ed9 Pre-package MS Teams v2.1.0 (#29473) 2024-12-11 12:41:35 -04:00
Felipe Martin
0ad5b6ac37 tests: skip flaky outgoing oauth connection tests (#29542) 2024-12-11 16:12:53 +01:00
Mario Vitale
861fcfb032 [skip ci] Stabilize replies_spec.ts (#29564) 2024-12-11 14:10:55 +01:00
Agniva De Sarker
7df4727353 [Aider assisted]: Use SelectBuilder and GetBuilder in webhook_store.go (#29555)
I was planning to kick off a campaign for this. But aider can do this just fine.

Starting off with a single file for now. But will slowly send more PRs with larger
commit diffs.

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-11 12:03:03 +05:30
Caleb Roseland
f1cb9f1ec2 MM-52512 fix ability to exclude archived channels in system console (#29122) 2024-12-10 13:28:20 -06:00
Scott Bishel
2c52f09071 update text, add tests (#29485)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-10 08:06:05 -07:00
Alejandro García Montoro
a906e980f9 Skip flaky test - Tracked in MM-62079 (#29494) 2024-12-10 15:46:59 +01:00
Jesse Hallam
5369f8b36b s/Get(Master|Replica)X/Get\1/g (#29520)
Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The
presence of the suffix suggests there's a `non-X` version: but in fact
we migrated these away a long time ago, so remove the cognitive
overhead.

As an aside, this additionally helps avoid trip up LLMs that interpret
this as "something to fix".
2024-12-10 09:57:19 -04:00
Pavel Mokeev
8b86e1276e GH-27059: Rewrite error messages about msg length (#29252)
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-10 14:32:13 +01:00
David Krauser
f1d5884532 MM-62105 use WARN log level when ws can't report hostname (#29523) 2024-12-10 09:33:44 +01:00
Jesús Espino
4c27e6ebfe Fixing accessiblity on search input (#29423)
Automatic Merge
2024-12-10 08:47:37 +01:00
Agniva De Sarker
0f5d160131 MM-62077: Fix cluster broadcast for LRU caches (#29488)
We were incorrectly not broadcasting status cache updates
inspite of that being an LRU cache.

We were also not doing it for profilesInChannel cache.
Now we fix it by properly checking the invalidationEvent
which is something local to the cache itself rather
than the cache provider.

https://mattermost.atlassian.net/browse/MM-62077
```release-note
NONE
```
2024-12-10 11:08:17 +05:30
Harrison Healey
69df5df878 Add placeholder MMAction and MMReduxAction types (#29484)
* Add dummy MMReduxAction type and use it in its ActionFunc types

* Use MMReduxAction in mattermost-redux reducers

I updated most reducers except for the following:

- I couldn't figure out how to type the request reducers because of
  handleRequest, and it wasn't worth spending time on because it's
  stable and we don't really use those.
- The typing reducers are weird because they use WS event names as
  constants. They should be given their own action types separate from
  the event names, and they probably shouldn't be in mattermost-redux.

There's also a few places that still use AnyAction, but those are for
helpers for individual reducers. In the future, we should probably pass
the data from the action directly into those.

* Add dummy MMAction type and use it in the web app ActionFunc types

* Use MMAction in web app reducers
2024-12-09 19:22:07 +00:00
Harrison Healey
e873e5c1ef Add web app versions of ActionFunc types (#29483)
* Re-export ActionFunc types from mattermost-redux from types/store

* Start using ActionFunc types from types/store instead of mattermost-redux

These are all the places where the type checker failed when I added the
web app version of ActionFunc. I'll move all the other files in a
separate commit.

* Use ActionFunc types from types/store everywhere outside mattermost-redux

* Make types/store versions of ActionFunc use web app GlobalState

* Stop passing GlobalState into ActionFunc explicitly

* Stop casting as GlobalState where it's no longer needed

* Prevent importing mattermost-redux version of ActionFunc in the rest of the app

* Fix no-restricted-imports applying incorrectly to mattermost-redux and types/store
2024-12-09 13:37:41 -05:00
Mario Vitale
7263ba4bc1 Enforce 0-failures for E2E tests (#29521) 2024-12-09 17:03:55 +01:00
M-ZubairAhmed
f80afad1b6 [MM-58441] Create a floating-ui Tooltip which will swap out ReactBootstrap tooltip (#29464)
Added a new tooltip
- components/team_sidebar/components/team_button.tsx
- components/post_view/reaction/reaction_tooltip/reaction_tooltip.tsx
- components/post_view/post_recent_reactions/post_recent_reactions.tsx
- components/common/comment_icon.tsx
2024-12-09 14:50:08 +00:00
Weblate (bot)
cf219b0e06 Translations update from Mattermost Weblate (#29518)
Automatic Merge
2024-12-09 14:47:37 +01:00
dependabot[bot]
5552997380 Bump the github-actions-updates group with 2 updates (#29517)
Bumps the github-actions-updates group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `github/codeql-action` from 3.27.5 to 3.27.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.27.5...v3.27.6)

Updates `tj-actions/changed-files` from 45.0.4 to 45.0.5
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](4edd678ac3...bab30c2299)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 10:29:50 +00:00
David Krauser
3224e0d3a2 MM-61991 Show server hostname in about modal (#29413)
This introduces a new entry in the `Main Menu -> About` modal with the hostname of the currently connected websocket. This will be used to aid debugging issues in clustered environments by showing which node in the cluster is servicing requests for a particular websocket.

This information is only visible in self-managed instances. It will not be visible on cloud instances.
2024-12-06 10:39:36 -05:00
Agniva De Sarker
59b8532a89 metrics/histogram: Fixing incorrect label_name (#29492)
We were incorrectly overwriting the same key - label_name.
```release-note
NONE
```
2024-12-06 19:34:46 +05:30
Mario Vitale
a90f19dc0f [skip ci] Fix/demote testcases (#29497) 2024-12-06 13:23:27 +01:00
Agniva De Sarker
e6c0ed4a1b MM-62085: Handle nil post priority (#29496)
https://mattermost.atlassian.net/browse/MM-62085

```release-note
NONE
```
2024-12-06 10:10:41 +05:30
Michele Lo Russo
b03409202e Use "transform: scale" to resize emoticons, and "zoom" when supported (#29276) 2024-12-05 16:22:55 -07:00
Alexandre Sollier
c67e5089c1 [MM-61946] Don't change the emoji picker search input text case (#29397)
This removes the search input text lowercasing from the
`EmojiPickerSearch` component, where it is used as the text displayed to
the user.

Instead, filter lowercasing is done in the `getFilteredEmojis` function
to make emoji search case-insensitive.

Signed-off-by: Kuruyia <github@kuruyia.net>
2024-12-05 13:16:56 -05:00
fxnm
491e46d390 [MM-61477] Fixed exif rotates images width and height is not correctly calculated (#29309)
* [MM-61477] Fixed exif rotates images width and height is not correctly calculated

* [MM-61477] Apply rotation ony to png or jepg

* [MM-61477] Added test cases to verify correct rotation

* fix: fixed wrong format

* uff

* fix: exif rotation is only possible on jpeg images

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-05 13:16:01 -05:00
Ivy Gesare
bc6f162d20 Change: Make custom status clear after 'Today', clear at midnight (#29072) 2024-12-06 01:18:13 +08:00
Alejandro García Montoro
6b648199f0 MM-61992: Verify license.Features.Users is not nil (#29417)
* Verify license.Features.Users is not nil

* Move check before DB call to avoid it if possible

* Add more context to the error
2024-12-05 16:46:04 +01:00