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

1645 Коммитов

Автор SHA1 Сообщение Дата
David Edler
d59c5b2608 Fixed errcheck issues in server/channels/app/import_functions_test.go (#29229) 2024-11-21 13:14:07 +01:00
Arya Khochare
45860309b1 Fixed errcheck issues in server/channels/app/plugin_install.go (#29062)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-21 11:30:30 +01:00
Ben Schumacher
5911590ce6 [MM-61858] Fix flaky TestSendNotifications (#29339) 2024-11-21 09:51:59 +01:00
Vishal
746eb70e01 [MM-60689] Add Webhook ID in the logs (#28846)
* add webhook id to logs

* Move hook_id context to api level from app level.

* pass errCtx to other references of same app-error-id

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-21 13:53:10 +05:30
Scott Bishel
790103fae0 MM-59540 Ensure user has invite team permission in order to change setting (#28670)
* ensure user has invite team permission in order to change setting

* add tests and handle UI

* lint fixes

* revert changes to invite section input

* update tests

* revert bad merge

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-20 16:02:32 -07:00
Ben Schumacher
11b66de686 [MM-61693] Only check for LDAP info if LDAP is enabled during Support Packet generation (#29185) 2024-11-20 17:55:37 +01:00
Arya Khochare
b986f39825 Fixed errcheck issues in server/channels/api4/user_test.go (#28647)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-20 17:28:39 +01:00
TheoForger
4bb4f9814b [MM-61077] Fix errcheck issues in server/channels/web/static.go (#29285)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-20 14:44:22 +01:00
Rohan Sharma
5de425c298 [MM-61462] Fix errcheck issues in server/channels/app/post.go (#29205)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-20 14:43:48 +01:00
Ivy Gesare
82bd3b6df1 [MM-61762] Fix errcheck issues in server/channels/app/platform/config_test.go (#29323)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-20 12:23:44 +01:00
molejnik88
1a095f74c2 [MM-61459] Fix errcheck issues in server/channels/app/plugin_signatur… (#29202) 2024-11-20 10:40:05 +01:00
Agniva De Sarker
5c5276312b Fix race condition in app/channel_test.go (#29331) 2024-11-20 10:28:02 +01:00
Arya Khochare
ed7a38e80c Fixed errcheck issues in server/channels/app/server_test.go (#29199)
* errcheck issues fixed

* NoError to Error

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-19 12:45:47 -05:00
Domenico Rizzo
f64402e5c5 MM-61519 Fix errcheck in channels/app/plugin_api_tests/test_update_user_auth_plugin/main.go (#29284)
* Removed test_update_user_auth_plugin from golangci

The test_update_user_auth_plugin has been removed from the .golangci.yml configuration file. This change simplifies the linting process by excluding unnecessary files.

* Refactored error handling in user auth tests

The error handling for the 'expectUserAuth' function within the user authentication plugin tests has been refactored. Previously, errors were not being explicitly checked after each call to this function. Now, an error check is performed after each invocation and if an error is found, it's immediately returned. This change improves the robustness of our test suite by ensuring that potential issues are caught and handled appropriately during testing.

* Refactor error handling in UpdateUserAuth

The error handling in the UpdateUserAuth function has been refactored. The variable 'err' was replaced with 'appErr' to better reflect its purpose and improve code readability.

* Updated user authentication in plugin API

The user authentication method in the plugin API has been updated. Previously, it was fetching the user based on a static configuration value. Now, it fetches the user dynamically using the provided userID. This change makes the function more flexible and adaptable to different use cases.

* Updated golangci configuration

Removed a test file from the exclusion list in the golangci.yml configuration. This will allow linting checks to be performed on this previously excluded file, improving code quality and consistency.

* Updated golangci configuration

Removed a test file from the exclusion list in the golangci configuration. This will ensure that our linting tools also cover this previously excluded test file, improving overall code quality checks.

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-19 11:54:58 -05:00
Nick Misasi
8f716a61e6 remove Stripe CSP from server (#29306)
* remove Stripe CSP from server

* Update tests

* Fix more tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-19 10:57:32 -05:00
Harshil Sharma
05abb39019 Revert ana ccidental change (#29325) 2024-11-19 17:50:37 +05:30
David Edler
03a4462b19 Fixed errcheck issues in server/channels/app/channel_test.go (#29233)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-19 12:46:27 +01:00
Harshil Sharma
949e13725f Added precense check for scheduled posts before accessing error code (#29322)
* Added precense check for scheduled posts before accesing error code

* Expliocitelly stated the undefined nature
2024-11-19 10:58:09 +00:00
AulakhHarsh
e5a4b1efba Fix errcheck issues in server/channels/app/platform/busy_test.go (#29318) 2024-11-19 10:45:54 +01:00
Agniva De Sarker
c6a7a8f628 Fix flaky TestCreatePost and others (#29320)
We don't clear the Redis cache for every test.
This can cause issues because the cache is shared
across test. We fix that with this PR.
```release-note
NONE
```
2024-11-19 14:23:37 +05:30
Rohan Sharma
aa0d117f30 [MM-61101] Fix errcheck issues in server/channels/app/channel.go (#28787)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-19 08:56:23 +01:00
Weblate (bot)
9e05c075ff Translations update from Mattermost Weblate (#29317)
Automatic Merge
2024-11-18 14:17:13 +01:00
Agniva De Sarker
7f032b0b39 MM-61524: Fix flaky test RedisPubSub (#29311)
- We refactor some of the testlib assertion code
and add a new function to just return true or false.

https://mattermost.atlassian.net/browse/MM-61524
```release-note
NONE
```
2024-11-18 14:55:34 +05:30
TheInvincible
c2c2bc1efe update status.go (fix errcheck issue) (#29156)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-18 09:23:11 +01:00
Rohan Sharma
c682f649b5 [MM-61464] Fix errcheck issues in server/channels/app/post_metadata.go (#29204)
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-18 08:35:50 +01:00
Agniva De Sarker
d6a89c69c2 Fix flaky test TestScheduledPostStore (#29301)
There were couple of errors in the test:
1. UpdatedScheduledPost will automatically
set the ProcessedAt to now internally inside
toUpdateMap. So setting the value from outside
has no effect.
2. The bug was that if it took more than a
milisecond to capture the time, and then
do the internal call, then the Get call
will have a higher value and therefore fail.

Since UpdatedScheduledPost doesn't return
an updated post, so there is no need
to compare the timestamps at all.
```release-note
NONE
```
2024-11-16 14:32:46 +05:30
pRAnaY
504934b612 fixed errcheck in test_serve_metrics_plugin (#29289) 2024-11-15 21:02:17 +01:00
Harrison Healey
207503185e MM-61012 Add special handling to OS detection for mobile apps (#29139)
* Stop recording unknown platforms as "Windows" in Sessions table

* Add more tests to user_agent_test.go

* MM-61012 Add special handling to OS detection for mobile apps

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-15 12:25:28 -05:00
Rohan Sharma
8aac1a0e2b [MM-61466] Fix errcheck issues in server/channels/app/post_persistent_notification_test.go (#29207) 2024-11-15 13:55:11 +01:00
Harshil Sharma
04b68c5cce Fix flaky TestHandleFailedScheduledPosts test (#29292)
* Simplified test

* Restored original timeout duration
2024-11-15 11:45:28 +00:00
Domendra Singh Komra
ee1d6eb887 Fixes errcheck issues in server/channels/api4/team_test.go (#29151)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-15 12:17:38 +01:00
Ivy Gesare
9b15c50418 [MM-61509] Fix errcheck issues in server/channels/app/user.go (#29154)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-15 11:13:15 +01:00
Agniva De Sarker
d83156027a Fix race condition in the web package (#29288)
Essentially applying the fix for https://github.com/mattermost/mattermost/pull/29214
to the web package. It seems like the app.StoreOverrideWithCache
function was never used in this package.

Just a small highlight of how much boilerplate is repeated
in multiple packages
```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-15 11:30:56 +02:00
Ibrahim Serdar Acikgoz
0e6ec05d5c [MM-53339] import: dont miss out reactions from replies (#29060) 2024-11-15 09:45:14 +01:00
mas-who
3da77f2f05 GH-29265: Fix errcheck errors in server/channels/app/platform/feature_flags.go (#29269)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-15 09:32:11 +01:00
Agniva De Sarker
8d1c42bc91 MM-61229: Place Redis behind enterprise (#28917)
And re-order the server initialization (AGAIN).

For the nth time, we found several bugs in the initialization
process.

1. filestore.NewExportFileBackend and filestore.NewFileBackend
depended on license, but the license wasn't even loaded until
later!
2. The `ps.sqlStore.UpdateLicense` call also didn't work
because the license wouldn't get loaded. It only accidentally
worked because of `ps.AddLicenseListener` which would update
the license later on. We remove that.

Ideally, we would have loaded the license first and then
checked for redis client, but it's very difficult to do that.
Reasons are explained in the code comment.

So we just wait until the license is loaded, and simply throw an
error later.

https://mattermost.atlassian.net/browse/MM-61229
```release-note
NONE
```
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-15 13:27:23 +05:30
yasserfaraazkhan
38823603a3 E2E test for scheduled Draft feature (#28433) 2024-11-15 02:39:35 +05:30
Claudio Costa
3af3af0b25 [MM-60792] Add support for loading experimental (e.g., in progress) languages (#29009)
* Add support for loading experimental (e.g., in progress) languages

* Fix e2e config

* Improve language labels

* Improvements
2024-11-14 15:02:00 -06:00
pRAnaY
7403d29634 [MM-61517] Fix errcheck issues in channels/app/plugin_api_tests/manual.test_http_hijack_plugin (#29190)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 13:47:19 -06:00
Ben Schumacher
4620ab6ad3 Skip flaky TestWebHubCloseConnOnDBFail (#29268) 2024-11-14 22:31:34 +05:30
Pablo Vélez
fb0582c04e MM-61731 - enhance failed sent system bot message (#29253)
* MM-61731-enhance-failed-sent-system-bot-message

* adjust test and adjust i18n messages

* set back correct value

* improve naming and get channels logic

* hide channel name if the channel is private

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-14 16:56:40 +01:00
mas-who
f48fd7b791 GH-28752 fix errcheck lint issues in server/channels/testlib/helper.go (#29260) 2024-11-14 13:13:45 +01:00
Ben Schumacher
18c5fe8f6a Skip flaky TestEditChannelBookmark/a_websockets_event_should_be_fired_as_part_of_editing_a_bookmark (#29267) 2024-11-14 10:19:52 +00:00
Seiya Homma
6e81e8c35c [MM-61512] Fix errcheck issues in server/channels/app/users/helper_test.go (#29167)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 10:19:52 +01:00
Elias Nahum
701d1dbd68 optionally exclude threads in direct messages (#29042)
* optionally exclude threads in direct messages

* add excludeDirect option in client4

* Skip flaky test

* refactor double negate

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-11-14 16:57:15 +08:00
Arya Khochare
38e2f67583 Fixed errcheck issues in server/channels/app/slashcommands/command_loadtest.go (#29169)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 09:51:53 +01:00
TheInvincible
45235a0ef6 Update file_info.go (fix errcheck issue) (#28966)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 08:42:32 +01:00
Sumedha Koranga
e7e1d7d7ce [MM-61513] Fix errcheck issues in channels/app/users/users_test.go fixes #29179 (#29188)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 08:34:41 +01:00
Alexandre Sollier
3ed337b34d [MM-61511] Fix errcheck issues in channels/app/user_viewmembers_test.go (#29149) 2024-11-14 08:31:00 +01:00
Domenico Rizzo
6f57b4f53b MM-61503 Updated golangci.yml configuration (#29249)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2024-11-14 08:28:54 +01:00