1817 Коммитов

Автор SHA1 Сообщение Дата
Ibrahim Serdar Acikgoz
902888efd9 server/channels/app/export_test: fix a lint error due to err check (#29650) 2024-12-19 19:34:46 +01:00
Claudio Costa
8c41ec75db httpservice: improve validation of proxied URLs (#29600) 2024-12-19 17:55:42 +00:00
Ibrahim Serdar Acikgoz
e76786278b [MM-60083] export: do not export DMs/GMs if users are deleted (#28854) 2024-12-19 16:47:52 +01:00
Seiya Homma
cf392f7cca [MM-62143] Avoid SELECT * in role_store.go 2024-12-19 13:57:10 +01:00
Ibrahim Serdar Acikgoz
bf4d41954a [MM-53245] export/import: add Props to the replies (#29531) 2024-12-18 17:36:17 +01:00
Harshil Sharma
041c874961 Reduced unnecessary debug logs from scheduled post job (#29560)
* Reduced unnecessery debug logs from scheduled post job

* Improved log
2024-12-18 12:58:32 +05:30
Ivy Gesare
0e4e7ca0b9 [MM-61514] Fix errcheck issues in server/channels/app/web_broadcast_hooks_test.go (#29213)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
2024-12-17 15:09:24 -06:00
Ibrahim Serdar Acikgoz
bdbce2f8be server/channels/app/import_functions_test: fix build errors (#29630) 2024-12-17 10:36:58 -05:00
Arya Khochare
cf93d2a14e Fixed errcheck issues in server/channels/app/export_test.go (#29004)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-12-17 16:15:38 +01:00
Scott Bishel
faa7e4f2ea MM-62188 - Revoke user sessions when converted to bot (#29573)
* revoke user sessions when converted to bot

* lint fixes
2024-12-17 07:55:10 -07:00
Ibrahim Serdar Acikgoz
de59770797 [MM-51468] import: allow usernames to be uppercase (#29530) 2024-12-17 13:27:53 +00:00
Ibrahim Serdar Acikgoz
74afa1fa78 [MM-60684] GetMaxPostSize: update threshold to V2, it was way overdue (#28662) 2024-12-17 13:26:48 +00:00
Arya Khochare
1f7f0d20cd Fixed errcheck issues in server/channels/app/migrations.go (#29067) 2024-12-17 14:16:37 +01:00
Arya Khochare
cdfadcf47d Fixed errcheck issues in server/channels/app/security_update_check.go (#29200) 2024-12-17 12:52:43 +01:00
Ibrahim Serdar Acikgoz
b59819da68 [MM-56986] imports/import_validators: add valid guest role check (#28658) 2024-12-17 11:49:55 +00:00
Ibrahim Serdar Acikgoz
424ce2b8db [MM-59503] export: enable exporting configuration with mmctl (#28412) 2024-12-17 10:23:52 +01:00
fume4mattermost
4a5994906c [MM-56031] Add DeleteSidebarCategory method and channel category API tests (#29161)
* Add DeleteSidebarCategory method and channel category API tests

* Add test to verify channels move to default categories when custom category is deleted

* rename channel category tests and remove duplicate context

* TestNotifications fix

---------

Co-authored-by: Fume <contact@fumedev.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-16 16:29:43 -05:00
Weblate (bot)
93ed5c445a Translations update from Mattermost Weblate (#29619)
* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (2602 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Ukrainian)

Currently translated at 87.5% (5274 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Czech)

Currently translated at 97.7% (5887 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Kazakh)

Currently translated at 13.1% (794 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/kk/

* Translated using Weblate (German)

Currently translated at 100.0% (2602 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/de/

* Translated using Weblate (German)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/de/

* Translated using Weblate (Ukrainian)

Currently translated at 90.4% (5446 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Czech)

Currently translated at 99.5% (5994 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Dutch)

Currently translated at 99.9% (6020 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nl/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Ukrainian)

Currently translated at 90.4% (5446 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Czech)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Czech)

Currently translated at 78.0% (2032 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/cs/

* Translated using Weblate (Kazakh)

Currently translated at 13.5% (817 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/kk/

* Translated using Weblate (Ukrainian)

Currently translated at 92.0% (5542 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Czech)

Currently translated at 80.1% (2086 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 80.2% (2087 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 85.0% (2213 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 85.1% (2215 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Ukrainian)

Currently translated at 100.0% (2602 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/uk/

* Translated using Weblate (Ukrainian)

Currently translated at 92.6% (5578 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Czech)

Currently translated at 86.0% (2238 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Czech)

Currently translated at 86.1% (2242 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Kazakh)

Currently translated at 13.7% (830 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/kk/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2602 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/tr/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/tr/

* Translated using Weblate (Kazakh)

Currently translated at 13.8% (832 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/kk/

* Translated using Weblate (Ukrainian)

Currently translated at 93.0% (5605 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/uk/

* Translated using Weblate (Polish)

Currently translated at 100.0% (6021 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/pl/

* Translated using Weblate (Czech)

Currently translated at 86.9% (2262 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Kazakh)

Currently translated at 13.9% (839 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/kk/

* Translated using Weblate (Czech)

Currently translated at 89.3% (2326 of 2602 strings)

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/cs/

* Translated using Weblate (Norwegian Bokmål)

Currently translated at 53.7% (3236 of 6021 strings)

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/nb_NO/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/server
Translate-URL: https://translate.mattermost.com/projects/mattermost/server/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Mattermost/webapp
Translate-URL: https://translate.mattermost.com/projects/mattermost/webapp/

---------

Co-authored-by: Serhii Khomiuk <sergiy.khomiuk@gmail.com>
Co-authored-by: master7 <marcin.karkosz@rajska.info>
Co-authored-by: Martin Mičuda <micuda@rematiptop.cz>
Co-authored-by: Akbar Abdrakhmanov <kz.akbar@gmail.com>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: Frank Paul Silye <frankps@gmail.com>
2024-12-16 19:48:31 +00:00
Amy Blais
2b9e85f155 Update minimum supported Safari and Firefox versions (#29576)
Automatic Merge
2024-12-16 12:47:38 +02:00
Jesús Espino
d316df6d28 Replacing interface{} with any everywhere (except generated mocks) (#29446) 2024-12-15 21:11:36 +01: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
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
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
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
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
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
AulakhHarsh
1b164c8302 Fix errcheck issues in server/channels/app/platform/service.go (#29366) 2024-12-12 11:22:57 +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
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
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
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
Weblate (bot)
cf219b0e06 Translations update from Mattermost Weblate (#29518)
Automatic Merge
2024-12-09 14:47:37 +01: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
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
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
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
Jessie Kahn
82c1f7bf09 [MM-61508] Fixed errcheck issues in upload_test.go, [MM-61510] Fixed errcheck issues in user_test.go (#29308) 2024-12-05 12:22:41 +01:00