Commit Graph

17978 Commits

Author SHA1 Message Date
Pantelis Vratsalis
d9f5cd2740
[MM-52445] Fix double url encoding of oauth redirect URI params (#23176)
* [MM-52445] Fix double url encoding of oauth redirect URI params

* Additional test based on code review

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-09 19:18:24 +01:00
Jesse Hallam
c9e71a2dde
Remove workflow failure check in favour of Argo-driven version (#25366)
* Simplify workflow failure check

Consolidate the workflow failure check directly into *-master.yml. This results in some code duplication, but makes it much clearer as to what's going on. While we're in here, remove the legacy reference to the `monorepo` branch when triggering.

* just remove the workflow in favour of the Argo version
2023-11-09 12:01:49 -04:00
Devin Binnie
8bf0c19714
[MM-55165] Remove target=_blank from file preview links (#25317) 2023-11-09 09:21:13 -05:00
Sapna Sivakumar
dc269f244e
[MM-55108] Replace usage of LocalizedIcon in 'user_group_popover.tsx' with i/span tags (#25283) 2023-11-09 15:53:46 +05:30
M-ZubairAhmed
cd58a5baaf
[MM-55339] Improve types for Markdown component (#25350) 2023-11-09 14:17:22 +05:30
Ben Cooke
ee6457c3df
[MM-55009] Remove pre-fetch preference and set new pre fetch limits (#25251)
* remove pre-fetch preference and set new pre fetch limits

* i18n

* adding unit test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 17:23:32 -05:00
Claudio Costa
e96fb9c32c
Register WebVTT format to be previewable as text (#25289) 2023-11-08 16:21:26 -06:00
Harrison Healey
be34a5d2df
Run component tests with a real store and use renderWithContext everywhere (#25217)
* Change renderWithFullContext to not mock Redux store

* Remove renderWithIntl and renderWithIntlAndStore

* Rename renderWithFullContext to renderWithContext

* Use renderWithContext for WS context
2023-11-08 17:02:40 -05:00
Santosh
ab349946db
Fixes #25120 - Horizontal scrollbar appearing on slash command autocomplete (#25154) 2023-11-08 15:42:42 -06:00
Harrison Healey
ef66f7beab
MM-54238 Add WebSocket broadcast hook and don't broadcast when other users were mentioned (#24641)
* MM-54238 Initial implementation

* MM-54238 Move websocket hook into app package

* MM-54238 Add tests for mentions in posted websocket messages

* Fix styling

* Fix other styling

* Idiomatic ID naming for new code

* Fix more styles

* Separate hooks to add mentions and followers

* Improved error handling for invalid types in hooks

* Rename HasChanges to ShouldProcess

* Pass broadcast hooks through hubStart

* Add test helper for asserting json unmarshaling

* Fix missing arguments in tests

* Ensure broadcast hooks are sent across the cluster and not to users

* Ensure tests actually cover following a post

* Fix code broken by merge

* Go vet again...

* Deep copy event before processing it with hooks

* Replace RemoveBroadcastHooks with WithoutBroadcastHooks

* Address feedback

* Add helper to fix type information for hook args

* Wrap WebSocketEvent and simplify BroadcastHook

* Address feedback

* Address feedback
2023-11-08 16:17:07 -05:00
Ben Schumacher
5e62ba8ccc
Fix bad merge (#25371) 2023-11-08 12:18:33 -05:00
Nhan Nguyen - Edward
808c6ec6dc
MM-53360 : Scroll to the bottom of channel banner (#24682)
* feat(channel-chat): MM-53360 Scroll to the bottom of channel chat

This commit adds new toast to the channel chat, which allows users to
scroll to the bottom quickly.

As it is needed to be along side with the `Search hint toast`, I needed
to adjust the code inside `hint_toast, toast_wrapper` more than
expected.

- [x] Updated tests/snapshots

* refactor(scroll-to-bottom): MM-53360 Replace if block => separated func

* style: MM-53360 Fix order of imports

* refactor(scroll-to-bottom): MM-53360 Simplify hideScrollToBottonToast

* test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test

This commit migrates unit tests from `enzyme` to `react-testing-library`.

Besides, it adds new test ids for testing purposes.

* fixup! test(scroll-to-bottom): MM-53360 Migrate test from enzyme to react test

* style: MM-53360 Fix eslint error

* style(hint_toast): MM-53360 Update style to match the design

Decrease the size, and increase the font-weight of the shortcut key.
See more at: https://www.figma.com/file/gbnx8ydTX0bTFIbJ8NWGfR/MM-53360-Scroll-to-bottom-of-chat?type=design&node-id=1101-21615&mode=dev

* feat(scroll-to-bottom): MM-53360 Change condition to show toast

- Hide the toast after clicking "Jump to recents".
- Do not show the toast if the user dismissed it before.

* fixup! feat(scroll-to-bottom): MM-53360 Change condition to show toast

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 12:13:52 -05:00
Asaad Mahmood
2c82ff85a5
MM-55050 - Updating Terms of Service page (#25163)
* MM-55050 - Updating Terms of Service page

* Updating button group

* Updating button style

* Updating bsstyle

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 20:35:20 +05:00
Antonis Stamatiou
cfa48dd4c4
fix: Show proper version on about modal (#25370) 2023-11-08 17:24:23 +02:00
Scott Bishel
818a48190e
MM-54774 - update session roles when promote/demote guests (#25156)
* update session roles from user roles.

* update so user is not retrieved again

* return error, rather than log warning

* Update session.go

Fix bad merge

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 07:27:42 -07:00
KIMBOH LOVETTE
a6ba7163c8
[GH-21566] Add request context and logger to all public methods in server/channels/app/authentication.go (#25270) 2023-11-08 14:39:09 +01:00
Paul Vrn
dd46afacd6
[MM-55004] Add warning log message when app run as root (#25213)
* feat: add log warn when app is run as root user

* Modify warning message

* Move warning message condition to L415

* move check to cmd/mattermost/main.go

* Update server/channels/app/server.go

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>

* Moved checkForRootUser to root.go

* format root.go

* remove unnecessary space

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 11:39:37 +01:00
Asaad Mahmood
682ce17bc7
MM-50246 - Updating custom styles for login page (#25347)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-08 12:30:50 +05:00
Agniva De Sarker
3563e56a77
MM-54998: Optimize JSON marshalling in websocket broadcast (#25286)
Marshalling a json.RawMessage is not zero overhead. Instead,
it compacts the raw message which starts to have an overhead
at scale.

https://github.com/golang/go/issues/33422

Since we have full control over the message constructed, we
can simply write the byte slice into the network stream.
This gives considerable performance boost.

```
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost/server/public/model
cpu: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
             │   old.txt    │              new_2.txt              │
             │    sec/op    │   sec/op     vs base                │
EncodeJSON-8   1640.5n ± 2%   289.6n ± 1%  -82.35% (p=0.000 n=10)

             │  old.txt   │             new_2.txt             │
             │    B/op    │    B/op     vs base               │
EncodeJSON-8   528.0 ± 0%   503.0 ± 0%  -4.73% (p=0.000 n=10)

             │  old.txt   │             new_2.txt              │
             │ allocs/op  │ allocs/op   vs base                │
EncodeJSON-8   5.000 ± 0%   4.000 ± 0%  -20.00% (p=0.000 n=10)
```

P.S. No concerns over changing the model API because we are
still using 0.x

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

```release-note
Improve websocket event marshalling performance
```
2023-11-08 12:15:24 +05:30
Akbar Abdrakhmanov
f29fbddef1
[MM-55107] Replace usage of LocalizedIcon in 'update_user_group_modal.tsx' with i/span tags (#25299) 2023-11-08 06:46:30 +05:30
Aydın Davutoğlu
b19b62b83f
Add the request context and logger to all public methods in server/channels/app/auto_responder.go (#25295)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 19:25:52 +01:00
Paul-Stern
9596c46115
Mm 55298 generic integration action (#25320) 2023-11-07 12:07:08 +01:00
Atharva Joshi
f8f50ca882
[MM-54804] Convert ./components/post_emoji/post_emoji.tsx from Class Component to Function Component (#25080)
* ISSUE-#24767 | Convert post_emoji.tsx from Class Component to Function Component

* lint fix

* resolve changes

* lint fix

* lint fix

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 10:51:53 +01:00
Muzakir Shah
7f457ffed3
loading_spinner.tsx converted to functional component. (#25115)
* loading_spinner.tsx converted to functional component.

* merging changes revised

* fixing CI failures

* fixing linting errors

* snapshot updation

* Update snapshot

* Update snapshot

* update snapshot

* Update snapshot

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 10:51:21 +01:00
Mario Vitale
42b3ef0238
CLD-5699 Preliminary fixes (#25040)
* Rework some of PR24647
* Store MM_LICENSE to .env.server file
* Remove legacy network setup
* Fixes, generate docker-compose and env files in one place
* Simplify templating mechanism for server.yml
* Fix race condition for dashboard start
* Fix websockets for local debugging
* Fix: make webhook-interaction work again
* Simplify and fix dashboard&cloud configuration, formatting fix

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-07 10:45:43 +01:00
Ben Schumacher
b0bf5d0765
[MM-55053] Use request-specific logger in channels/app/file.go (#25037) 2023-11-07 10:04:16 +01:00
mattermod
45d6fb122f Update latest version to 9.1.2 2023-11-07 07:36:55 +00:00
M-ZubairAhmed
f733dc58fa
[MM-55294] Migrate jest v26 to v29 to speed up "web app CI PR / test" (#25192) 2023-11-07 11:41:26 +05:30
Julien Tant
4dbf1f8c26
[MM-54029] IDP descriptor can any string (#24250)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-06 15:24:59 -07:00
Claudio Costa
c516d5cb15
[MM-55164] Fix deadlock on shutdown due to stuck goroutine (#25227)
* Update code.sajari.com/docconv

* go mod tidy
2023-11-06 11:00:58 -06:00
Nick Misasi
92d9826a3c
Fix preparing workspace redirecting to invalid channel (#25247) 2023-11-06 10:56:43 -05:00
Christopher Speller
3b17fc4fdb
Update playbooks to v1.39.1 (#25281) 2023-11-06 07:50:24 -08:00
Ben Schumacher
42822ccdb8
Remove dead method Handle404 (#25315) 2023-11-06 14:54:07 +01:00
Paul-Stern
2a5e04d9b2
[MM-55213] GenericStoreResult in channels (#25234) (#25265) 2023-11-06 13:52:12 +01:00
Sudhanshu Pandey
b3c183cdf2
[MM-54820] Convert ./components/channel_header_mobile/unmute_channel_button/unmute_channel_button.tsx from Class Component to Function Component (#24974)
* chore: migrated UnmuteChannelButton to fun. comp.

* fix: resolves type errors

* feat: introduces memo to unmute_channel_button

* chore: minor syntax improvement

* chore: address code review suggestions

* chore: address code review suggestions
2023-11-06 13:24:18 +01:00
Umar Abid
caa87ec7f6
[GH-24745] Convert ./components/admin_console/setting.tsx from Class Component to Function Component (#24861)
* fix: convert admin_console/setting.tsx to FC

* fix: update failing snapshots
2023-11-06 13:22:16 +01:00
Daniel Espino García
83e06a65a6
Fix error when updating a GM/DM (#25186) 2023-11-06 13:19:58 +01:00
Rohit Chaudhari
2f86b1ffd7
[MM-54816] Convert ./components/admin_console/color_setting.tsx from Class Component to Function Component (#24963)
* Convert class component to function component

* Apply changes from suggestions

* Lint check

* Update schema_admin_settings.test.jsx.snap

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-06 12:42:55 +01:00
Ben Schumacher
486e836b83
Fix racy test issues (#24971) 2023-11-06 12:26:17 +01:00
Deepakumar V U
366d1613b7
[MM-55106] Replace usage of LocalizedIcon in 'system_notice.tsx' with i/span tags (#25268) 2023-11-06 15:49:38 +05:30
Harrison Healey
ec4dc6b122
Fix typo in emoji code (#25290) 2023-11-03 16:57:05 -04:00
Christopher Poile
1388c150b5
MM-53764 - Remove OpenGraph section from API docs (#24958)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 16:07:23 -04:00
Mario Vitale
2e7728b737
Fix the monorepo-checker CI job (#25287) 2023-11-03 17:31:42 +01:00
Mario Vitale
5d1cb1b931
Fix - Run artifacts workflow only for monorepo branches (#25279)
* Run artifacts jobs conditionally, add test change

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 16:10:40 +01:00
Scott Bishel
db238a205c
MM-55202-remove 'boards' from help command (#25225)
* remove 'boards' from help command

* remove boards from /help command

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 15:27:34 +01:00
Antonis Stamatiou
fc87054f14
feat: Introduce go-version file to support multiple go versions on CI (#25271) 2023-11-03 16:25:54 +02:00
Syed Fazil
b2abd533a1
[MM-55212] Migrate server/channels/app/channel.go to make use of GenericStoreResult (#25262)
* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

* Make use of GenericStoreResult in channels/app/channel.go

---------

Co-authored-by: fazil-syed <fazil@Gojo>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 12:50:25 +01:00
Emil-Carlsson
19eeccceb5
Wont show password if only LDAP/AD enabled (#23860) (#24735)
Automatic Merge
2023-11-03 12:22:22 +01:00
Catena cyber
04e7b6bc9e
Applies perfsprint linter (#24999)
Replacing usages of fmt.Sprint with faster alternatives

Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
2023-11-03 11:18:18 +01:00
Ben Schumacher
43f4734eae
[MM-55051] Assign correct timestamp to support packet files (#25035)
* Assign correct timestamp to support packet files

* Fix linter error

* Add back compression

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-03 09:48:18 +01:00