Commit Graph

17720 Commits

Author SHA1 Message Date
Aldrin
2ff946e79b
chore: remove deprecated "io/ioutil" imports (#25119)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2023-11-16 12:15:30 +01:00
Ben Schumacher
afb48219c0
Simplify request generation in store tests (#25422) 2023-11-16 09:51:18 +01:00
Harshil Sharma
51715d5ed6
[MM-55336] Fixed teamname alignment in channel switcher (#25429) 2023-11-16 09:58:39 +05:30
Christopher Poile
759bb70b2f
MM-55060 - Calls: Add PushTypeCalls for calls-specific push notifications (#25405)
* add PushTypeCalls for calls-specific push notifications

* remove PushTypeCalls; add PushSubType for backwards compatability

* don't capitalize calls subtype

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-15 13:06:03 -05:00
Amy Blais
f27a2ca263
Update en.json (#25436)
Automatic Merge
2023-11-15 18:22:22 +02:00
Caleb Roseland
22190c13dd
MM-55403: fix remote marketplace visibility (#25426) 2023-11-15 10:08:16 -06:00
Agniva De Sarker
864046f782
MM-55450: Handle error in db migrate phase (#25430)
We were not handling the error from initConnection.

https://mattermost.atlassian.net/browse/MM-55450
```release-note
NONE
```
2023-11-15 09:50:20 +05:30
Nick Misasi
fee6606606
Fix flaky test api4/Test_applyIPFilters (#25437)
Automatic Merge
2023-11-14 23:52:23 +02:00
Syed Ali Abbas Zaidi
6343e0e89f
[MM-55331] Convert ./components/channel_header_dropdown/menu_items/view_pinned_posts/view_pinned_posts.tsx from Class Component to Function Component (#25400)
* [MM-55331] Convert `./components/channel_header_dropdown/menu_items/view_pinned_posts/view_pinned_posts.tsx` from Class Component to Function Component

* refactor: Implement useCallback to avoid unwanted renders

* refactor: import mouse event type from react

* refactor: deprecate localizeMessage with intl

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 17:35:19 +01:00
Devin Binnie
1bd72bdb99
[MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job to keep track of post stats for Postgres (#25152)
* [MM-55014][MM-55015] Add last login timestamp for users, add materialized view and refresh job for Postgres

* Check fixes

* Fix type issue

* Add verification that lastlogin was updated

* PR feedback

* Morge'd

* Morge'd again

* Merge'd

* Update admin setting strings

* WIP

* PR feedback

* Oops

* Fix i18n

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 11:26:27 -05:00
Umar Abid
41c08a3715
[GH-25020] Add new resource links to [Help (?) drop-down menu] & icons (#25070)
* fix: add resource links Help (?) dropdown

* fix: refactor styles and update link url

* update: i18n and snapshot

* fix: update style and refactor

* fix: i18n

* fix: update test snapshot

* Update webapp/channels/src/components/global_header/center_controls/user_guide_dropdown/__snapshots__/user_guide_dropdown.test.tsx.snap

* Update webapp/channels/src/components/global_header/center_controls/user_guide_dropdown/__snapshots__/user_guide_dropdown.test.tsx.snap

* Update webapp/channels/src/components/global_header/center_controls/user_guide_dropdown/__snapshots__/user_guide_dropdown.test.tsx.snap

* Update webapp/channels/src/components/global_header/center_controls/user_guide_dropdown/user_guide_dropdown.tsx

---------

Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 07:42:56 -08:00
Harshal sanghvi
d34683f91d
[MM-52941] Adds from: suggestion when typing @ in search (#24168)
* migrated session_length_settings, settings_group to typescript

* migrated cluster_table_container to typescript

* resolved linter and non null assertions

* fixed settings_group import

* fixed cluster_table_container import

* fixed CI CD errors

* fixed names and added in built type for license

* fixed consitency and mouse event

* fixed type annotations and imports

* added search by @

* handle case by replacing

* fixed implementation and added tests

* new implementation to search with @

* fix space

* fixed comments

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 07:38:05 -08:00
Aydın Davutoğlu
bc58437e63
[MM-55302]Migrate server/channels/app/user.go to make use of GenericStoreResult (#25409) 2023-11-14 15:13:40 +01:00
Nick Misasi
e1c851a3ca
[CLD-6324] Cloud IP Filtering (#24726)
* Initial comit for ip filtering service implementation

* Add audit logs for IP Filters

* start of webapp work

* Stashing

* Updates based on Agniva's feedback around service vs einterface

* Updates completed

* Commit before refactoring, everything's working

* First pass of cleanup complete, front-end tests added

* actually add files

* Updates to some translation strings, running i18n-extract

* Lock everything behind a feature flag

* Fix tests, try to fix some linter stuff

* Fixed linter for JS, on to scss

* Fixed linter for scss

* Fix linter

* More fixes for pipeline

* Support for IPV6

* Remove tsx file that was removed in masteR

* Revert package.json and package-lock.json to master, add cidr-regex dep into channels/package.json

* Another commit to force fix Github

* Fixes around IPV6. Some suggestions from Matt re: UX review. Fixing pipelines for tests and types on new cidr-regex package

* Changes to address Matt's feedback

* A few more changes for clean up

* Add support for permissions

* Fix vet for OpenAPI spec

* Actually add the yaml file for openapi

* Add permission migration to allow support for IP Filtering

* Fix tests

* Final fixes from Matt

* Remove cancel button from page, update link outs to documentation

* Update test to account for removed cancel button

* Adjustments based on feedback from Harrison

* More fixes from PR feedback

* Add a t to fix translations that doesn't seem to be breaking anyone else?

* More fix

* updates for PR feedback

* Fix linter

* Fix types

* Now fix the linter again

* Add back tests because Harrison was able to get them running

* Adjustments for PR feedback

* Remove admin_definition.jsx

* Fix linter

* [CLD-6453] IP Filtering notification email for sysadmins (#25224)

* Initial commit for IP filtering alert email

* Updates to style for email, addition of ip_filtering email:

* Fix pipelines

* Adjustments from Matt's feedback

* Padding changes

* template diff (#25249)

Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>

* Fix hardcoded true, remove bool return value

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>

* Lock feature behind enterprise license. Drop cidr-regex in favour of ipaddr.js dependency. Refactor isIpAddressWithinRanges to use ipaddr.js

* Add a couple server tests

* fix linter

* Fix types from merge conflicts

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Gabe Jackson <3694686+gabrieljackson@users.noreply.github.com>
2023-11-14 09:12:04 -05:00
Antonis Stamatiou
7bf9be2619
fix: Add new dev registry for pr artifacts (#25341) 2023-11-14 15:04:00 +02:00
KIMBOH LOVETTE
29cd6177c0
[GH-21565]-Add the request context and logger to all public methods in server/channels/app/audit.go (#25368) 2023-11-14 13:34:47 +01:00
Paul-Stern
5f8133254d
[MM-55304] Migrate "server/channels/store/searchlayer/user_layer.go" to use GenericStoreResult (#25351)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2023-11-14 10:18:10 +01:00
Syed Ali Abbas Zaidi
620acc029a
[MM-55334] Migrate ./components/admin_console/blockable_link/blockab_link.tsx from Class Component to Function Component (#25386)
* [MM-55334] Migrate `./components/admin_console/blockable_link/blockable_link.tsx` from Class Component to Function Component

* refactor: use prop destructuring

* fix: Implement useCallback to avoid unwanted renders

* refactor: import mouse event type from react

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 10:02:09 +01:00
Syed Ali Abbas Zaidi
b5bbe278eb
[MM-55333] Convert ./components/post_view/floating_timestamp/floating_timestamp.tsx from Class Component to Function Component (#25401)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-14 10:01:10 +01:00
Christopher Poile
5dea20dd3e
MM-54963 - Update prepackaged calls to v0.21.0
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-13 21:27:09 -05:00
Syed Ali Abbas Zaidi
71ea829328
[MM-55332] Convert ./components/permissions_gates/channel_permission_gate.tsx from Class Component to Function Component (#25399)
* [MM-55332] Convert `./components/permissions_gates/channel_permission_gate/channel_permission_gate.tsx` from Class Component to Function Component

* refactor: unify the if conditions

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-13 15:37:24 -05:00
Sudhanva-Nadiger
9156770b25
[MM-55326] Convert ./components/post_view/commented_on_files_message/commented_on_files_message.tsx from Class Component to Function Component (#25407)
* covert to func component

* update snap

* minor fix
2023-11-13 15:33:40 -05:00
M-ZubairAhmed
5a14575dee
snapshot (#25411) 2023-11-13 15:13:58 -05:00
Harrison Healey
9397970644
MM-55267 Add ability for server-side Markdown code to understand emojis (#25332)
* MM-55267 Add ability for server-side Markdown code to understand emojis

* Remove unused regex
2023-11-13 14:38:05 -05:00
Ashish Dhama
448d442a0b
[MM-40384]: Channel notification settings modal UX revamp (#24984)
* Move notification preferences modal to new UI

* fix lint issue

* fix i18n

* fix unit test

* fix type issue and lint errors

* fix test case

* move common components to widget modals dir

* fix css issue

* feedback changes

* fix lint and i18n issues

* more feedback changes

* fix issue with mobile notification ui

* fix test

* clean up

* remove name

* fix test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-13 14:20:35 -05:00
Agniva De Sarker
ec88ab4ee9
MM-55295: Improve DB performance of some APIs (#25318)
Load tests show that channelstore.GetMember and
channelstore.GetMembersForUser are among the chief
queries that take up CPU in the DB.

In this PR, we attempt some strategic optimizations to
reduce/optimize calls to channelstore.GetMember

1. Optimize  `(a *App) HasPermissionToChannel`

We replace GetChannelMember with GetAllChannelMembersForUser
because it's cache backed. So although it gets more data,
it does not hit the DB and saves some latency.

2. Optimize getPostsForChannelAroundLastUnread

We repace getChannelMember with getChannelMemberOnly
which is a lite version of the store call which queries
just the ChannelMembers table. This is because
in the app layer, we just use the LastViewedAt attribute.
Therefore, there is no reason to join with 5 tables when
a single table can do the job.

3. Optimize publishWebsocketEventForPermalinkPost

We use GetAllChannelMembersById instead of GetChannelMembersPage
which again joins with a lot of other tables.

4. Optimize countMentionsFromPost

Again, we replace GetChannelMember which is a costly call joining
multiple tables, with GetAllChannelMembersNotifyPropsForChannel
which is cache-backed and gives us just what we need in the app
layer - notify props.

```release-note
Make small optimizations in several DB calls:
- App.HasPermissionToChannel
- getPostsForChannelAroundLastUnread
- publishWebsocketEventForPermalinkPost
- countMentionsFromPost
```

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

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-13 21:15:57 +05:30
Nicolas Le Cam
1ed5d87342
Switch to docker compose v2 (#25048) 2023-11-13 14:30:24 +01:00
Antonis Stamatiou
bdb363bd28
fix: Fix about modal version for cloud installations (#25389) 2023-11-13 10:33:47 +02:00
Ben Schumacher
9cf84fb93f
[MM-55412] Use go-style error handling in team_controller (#25402) 2023-11-13 09:13:54 +01:00
Soumyadip Moni
3e3087955b
make use of GenericStoreResult in telemetry.go (#25388) 2023-11-13 11:11:17 +05:30
M-ZubairAhmed
9ac389f506
[MM-53102] Add support for multi-word highlights without notifications in web (#24050)
- Adds a new section under settings/notifications for adding custom multi-word keywords that get highlighted without notification
- Adds a new classname for highlighting words although the styling is the same as mentions highlights
- Added a few components to the ReduxFromProps pattern
- Adds supported type for the hook of PluginComponent type
- Add upsell for highlight without notification
- Moved 'setting_item.tsx' to the components folder
- Improved prop names and function structure for setting_item, setting_item_max and setting_item_min
- Moved 'toggle_modal_button.tsx' to the components folder
- Removed t and utility messages from a few components
- Fixed bug where the tooltip was not getting rendered on restrictedButtons
- Improved the mobile view of the settings modal
- Adds E2E for the feature
2023-11-11 19:33:28 +05:30
Jesse Hallam
48bf4e9bd8
Fix issue 25390 (#25403) 2023-11-10 21:55:33 -04:00
Trivikram Kamat
10026972b5
Migrate AWS SDK for JavaScript v2 APIs to v3 in e2e-tests (#25301) 2023-11-11 00:09:17 +05:30
Aldrin
f74bf47f07
[MM-55102] Replace usage of LocalizedIcon in 'channel_intro_message.tsx' with i/span tags (#25164) 2023-11-10 22:06:06 +05:30
M-ZubairAhmed
1ff1a1312b
upgrade (#25398) 2023-11-10 10:30:34 -05:00
Ben Schumacher
612e4458ef
[MM-55409] Enable revive linter on enterprise code (#25391) 2023-11-10 15:24:12 +01:00
Umar Abid
8e84adb176
[GH-24843]: Fix customize_your_experience overlay position (#25053)
* fix: customize_your_experience tour point position

* fix: overlayPunchOut position

* fix: styling

* fix: styling

* fix: semi-colon typo

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-10 09:01:02 -05:00
Paul-Stern
7d92e71daf
[MM-55299] Migrate server/channels/app/notification.go to make use of GenericStoreResult (#25338) 2023-11-10 14:45:02 +01:00
Paul-Stern
a602dcdfb2
[MM-55305] Migrate "server/channels/store/sqlstore/post_store.go" to use GenericStoreResult (#25344)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2023-11-10 14:43:39 +01:00
Paul-Stern
3a373fffc0
[MM-55300] Migrate "server/channels/app/post.go" to make use of GenericStoreResult (#25339)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2023-11-10 14:41:08 +01:00
Muzakir Shah
e130a37199
Convert status_icon_new.tsx to functional component (#24993)
* Convert  status_icon_new.tsx to functional component

* run the command run npm run fix and npm run test -- -u

* type check error fixed

* revised the changes

* Unintended changes revised.

* Revised changes

* map moved outside of component

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-11-10 10:23:11 +01:00
Ben Schumacher
a31b899818
Wipe LDAP filter when running make config-ldap (#25393) 2023-11-10 09:02:16 +01:00
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