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

2302 Коммитов

Автор SHA1 Сообщение Дата
Shivashis Padhi
20d690b412 [MM-45444] Denormalize Reactions to add ChannelId for top reactions insights query (#20572)
* Denormalize Reactions to add ChannelId for top reactions insights query

* Remove hardcoded timestamps

* Fix store, api4 tests for reactions

* Fix tests

* Fix integrity tests, allow reaction to have ChannelId populated before calling store function

* Lint fixes

* Add ChannelId field to BulkGetForPosts, Delete store handlers

* Add index to mysql migration, add not null characteristic without a separate command

* Select channelId instead of fetching post via store.GetPost, add if exists to drop column

* Make updating of Reactions conditional to support pre-migration

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-11 09:25:03 -04:00
Tim Scheuermann
7bbf30d6bc MM-45168 GraphQL: add fields to Team (#20610) 2022-07-11 15:05:09 +02:00
Tim Scheuermann
662248291e [MM-45168] Added graphql fields for channel and channel_member (#20613) 2022-07-11 13:58:05 +02:00
Claudio Costa
76583344c0 [MM-45504] Improve GIF preprocessing logic (#20595)
* Improve GIF preprocessing logic

* Prefer io to ioutil

* Avoid color palette allocation
2022-07-11 09:34:49 +02:00
Vishal
e5ee5eecd8 [MM-44488] Cloud limits: enforcing messages (#20362)
* Add new Job to keep updating the last_accessible_post time

* Filter out posts for funcs returning PostList model

* Separate methods to get and compute cache

* filter pinned posts

* For posts with sorted CreateAt order, support a faster form of filtering.

* Add inaccessible header for getPost and getPostsByIDs APIs

* replace manual binary search with the std. library

* in-place filter posts

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Nathaniel Allred <neallred@protonmail.com>
2022-07-06 11:56:39 +05:30
Martin Kraft
b99bd0d049 MM-45204: Enables Insights feature flag by default. (#20509)
* MM-45204: Enables Insights feature flag by default.

* MM-45204: Update test.
2022-07-05 09:16:44 -04:00
Doug Lauder
9cbe7dac09 Add system service for Focalboard multi product architecture (#20574)
* add system service; add GetUsers to users service
* add feature flag
2022-07-05 08:13:02 -04:00
Ibrahim Serdar Acikgoz
717a4d04a9 Use any instead of interface{} (#20577)
* replace interface{} with any
2022-07-05 09:46:50 +03:00
Allan Guwatudde
1d9fa3c333 [MM-43649] - Ability for end users to notify admin to upgrade workspace (#20338)
* [MM-43649] - Ability for end users to notify admin to upgrade workspace

* add test case

* move code to app layer

* feedback impl

* feedback impl-1

* feedback impl

* simplify logic

* fix typo and lint

* fix app layers

* Use a single critical section for users notified admin (#20488)

* Use a single critical section for users notifying admin

* change persistence mechanism

* add more tests

* change bot message

* fix translations

* update logic to notify once within cooloff period

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Nathaniel Allred <neallred@protonmail.com>
2022-06-30 09:24:42 +03:00
Allan Guwatudde
b445440600 [MM-45053] - Remove 'trial of Mattermost ending soon' product emails (#20550)
* [MM-45053] - Remove 'trial of Mattermost ending soon' product emails

* remove trial end warning email
2022-06-30 09:18:13 +03:00
Ballista01
e31dbb5aeb handle all JSON marshal errors in model/client4.go (#20440)
* handle all JSON marshal errors in model/client4.go

* handle a JSON marshal error in model/client4.go at line 4162

* declare jsonErr at L4162 before use

* change email *ValidateBusinessEmailRequest to email *StartCloudTrialRequest at L7866 to keep up with updated master branch
2022-06-27 14:57:01 +05:30
Allan Guwatudde
411e4d979c Sanitize cloud products for non admin users (#20540) 2022-06-27 07:51:06 +03:00
Zach Zundel
24c44736c0 [MM-41115] Add server-side username colorize preference (#19382)
* Server support for collapse consecutive preference

* Add server-side username colorize preference
2022-06-24 12:37:07 -04:00
Doug Lauder
f4dcffd8d3 Additional Product APIs for Focalboard multi-product architecture (#20527)
* bump focalboard version; add services to product API

* add API to fetch logger

* import boards in same fashion as enterprise
2022-06-23 07:55:50 -04:00
Pablo Andrés Vélez Vidal
2b8d63b606 MM-44509 - subscription change not reflected after trial (#20352)
* MM-44509 - subscription change not reflected after trial

* fix the tests

* receive the subscription id as param, defer the cache invalidation

* validate business email with body request

* update api request to accept json body payload

* fix unit tests

* fix tests after merge conflict fixes

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-21 01:40:27 +02:00
Ashish Bhate
7793aebfbb Revert "MM-45000: Change dyatlov dependency (#20443)" (#20506)
This reverts commit 680b00047f.

Reverts the recent opengraph update to fix some issues with our plugins
2022-06-20 20:34:41 +05:30
Shivashis Padhi
2cd83d2f8d [MM-44084] Feature: Top threads insights (#20195)
* Add route endpoints, model, store functions, and tests for top threads

* Run make store-layers

* Make the following changes

 - Fix top user threads query
 - Fix passing parameters in api4/insights.go to handler in app
 - Add top user threads test

* Add post-message, user_id, participants information to insights results

* model.TopThread.UserID -> model.TopThread.UserId, for compatibility with MySQL

* Rename name -> channel_name

* Add user information to response

* Link post in response, filter out deleted root posts from top threads

* Handle thread delete cases, add app tests for threads insights

* lint: fix typo

* lint: rename asserts

* lint: require.nil -> require.NoError

* Add integration tests for thread insights

* Add embeds and images to top posts

* Add license checks for top threads endpoints

* Query users in batch to populate post-creator

* Make the following changes

 - Add license to test server in api4/
 - Add tests for threads insights
    - top team threads shouldn't include threads from other teams, DMs
    - Test duration constraint
    - Pagination testing for top threads in model/insights_test.go

* Add i18n-extract

* i18n fixes

* Add username, nickname to user_information

* Hide message, user_id, post_id, reply_count in depth=1 of top threads response

* Fix tests using response.reply_count to use response.post.reply_count

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-20 10:27:17 -04:00
Agniva De Sarker
de50943d61 jake/gh 20356 (#20485)
* [MM-44667] Set InsecureSkipVerify for S3 when EnableInsecureOutgoingConnections is set

* Cleanup s3New, customTransport

* Lint fixes

* Cleanup s3store_test.go

* Using default transport

```release-note
NONE
```

Co-authored-by: Jake Gutierrez <jakegut0108@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-20 15:42:01 +05:30
Jason Blais
3aa4e4488b MM-45055 Change "Enable Authentication Transfer" to be (#20453)
Automatic Merge
2022-06-17 22:30:18 +03:00
Nathaniel Allred
d43c06ea75 remove freemium feature flag (#20491) 2022-06-17 11:13:22 -05:00
Riccardo Santoni
dd7067cbe9 [MM-44434] Introduced search for channel id's through system console. (#20259)
* Introduced search for channel id's

* Small fix to test case as it is not looking at count

* Introduced searching channels by id as a ChannelOpt. Defaulting to true for system console for the time being

* go fmt

* Modified whether to include search by id by passing it in as prop to search endpoint. Modified webapp to pass through search by id as well

* Fixed issue with full text search, as there is not always necessarily an index on Id.

* Modified test to verify count, and moved code inside conditional

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-16 11:32:16 -04:00
Tim Scheuermann
eb034fc981 MM-44236 Update server dependencies (#20444) 2022-06-16 08:50:55 +02:00
Mattermod
906fab07bd Update minor version to 7.1.0 (#20465)
Co-authored-by: Mmbot <mmbot@mattermost>
2022-06-14 17:41:50 +03:00
Agniva De Sarker
680b00047f MM-45000: Change dyatlov dependency (#20443)
* MM-45000: Change dyatlov dependency

https://mattermost.atlassian.net/browse/MM-45000
2022-06-14 16:11:53 +03:00
Martin Kraft
182ae1234a MM-43956: Adds post counts by duration. (#20131)
* MM-43956: Adds post counts by day.

* MM-43956: Test data cleanup. Switch from Unix to UnixMilli.

* MM-43956: Changes from selecting date data types to strings in SQL.

* MM-43956: Fixes date format key.

* MM-43956: Adds missing user id scope for 'my' top channels graph.

* MM-43956: Adds the ability to group post counts by hour.

* MM-43956: Require enterprise or professional license. Reject guests.

* MM-43956: Adds license for tests.

* MM-43956: Renames function.

* MM-43956: Omits future hours from post counts by hour.

* MM-43956: Adjust API response grouping to users timezone.

* MM-43956: Adds translation.

* MM-43956: Adds user's timezone to the data tier for the grouping by day and hour.

* MM-43956: Fixes layers.

* MM-43956: Lint fix.

* MM-43956: Fix store layers.

* MM-43956: Switches to default name for time package; changes parameter names to avoid naming conflict.

* MM-43956: Updates mocks.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-13 16:22:34 -04:00
Agniva De Sarker
7c1b8cd937 MM-43733: Set concurrency limits via configuration (#20413)
```release-note
We create a new config option MaxImageDecoderConcurrency which
indicates how many images can be decoded concurrently at once.

The default is -1 which means number of CPUs present.

This affects the total memory consumption of the server. The
maximum memory of a single image is dictated by MaxImageResolution * 24 bytes.
Therefore, a good rule of thumb to follow is that MaxImageResolution
* MaxImageDecoderConcurrency * 24 should be less then the allocated memory for
image decoding.
```

https://mattermost.atlassian.net/browse/MM-43733
2022-06-11 00:24:46 +05:30
Agniva De Sarker
16174cacf0 Fix client driver API for UpdateUserCustomStatus (#20433)
UpdateUserCustomStatus server API never returned the object.
But the client driver tried to parse the JSON response into
a struct, which always parsed as an empty struct.

We fix that by returning the original response and added
a comment to clarify that.

Found while adding coverage for custom status in the load-test
tool.

```release-note
NONE
```
2022-06-10 20:06:59 +05:30
darkLord19
a251510717 remove unused code around unimplemented ExperimentalSettings.EnableClickToReply setting (#20389) 2022-06-08 15:40:30 -04:00
Ben Cooke
2c63e8dd08 [MM-43785] Hide insights feature intro for new users (#20214)
* tools updates

* Revert "tools updates"

This reverts commit 6293297b55803c5a263e200ebd80192899666ae9.

* hide insights modal by default for new users

* updating feature flag for test

* updating preference tests

* fixing lint

* fixing comment

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-08 14:56:34 -04:00
Ibrahim Serdar Acikgoz
c986693e4a Revert "config/diff: add utility function to get diffs scoped with struct tags (#20297)" (#20391)
This reverts commit a18934b042.
2022-06-08 17:28:35 +03:00
Tim Scheuermann
ef3f1b5796 [MM-44925] simplified the ID generator (#20398) 2022-06-08 16:12:02 +02:00
Ashish Dhama
485f44c136 Set Advanced Text Editor feature flag default value to True (#20357)
Automatic Merge
2022-06-08 15:36:28 +03:00
Maria A Nunez
ab02903f8c Loosen password req defaults (#20372)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-07 16:48:47 -04:00
Claudio Costa
159ebc297d Pre-package Calls v0.6.0 and enable it by default (#20388)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-07 19:45:43 +02:00
Vishal
27fc14201f [MM-42192] Include deleted posts in GetPost (#20358)
* Introduced include_deleted query param on get posts endpoint

* Update the correct func name in the comment.

Co-authored-by: santoniriccardo <santoni.riccardo@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-06 13:29:42 +05:30
Ashish Bhate
8f912b697e MM-43918: freemium limit for storage (#20225)
Summary
Adds an API end point to return storage usage

Ticket Link
https://mattermost.atlassian.net/browse/MM-43918
2022-06-03 11:48:29 +05:30
Pablo Andrés Vélez Vidal
d5333603ab MM 43666 - request bussiness email (#20315)
* MM-43666 - request bussiness email

* add the newValidEmail information

* revert ff model changes

* remove unnecessary pointer and fix test spelling

* fix unit tests and add a new one for when passing a valid email

* fix go lint

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-01 23:36:03 +02:00
Nick Misasi
cffe921e62 [MM-44475] Team Unarchive: Do not allow to unarchive if workspace has reached the limit of teams (#20281)
* Prevent cloud limited installations from restoring teams when at or above the teams limit

* Code clean up

* fix i18n

* Actually fix i18n

* updates for govet

* Update model/client4.go

Co-authored-by: Vishal <vish9812@gmail.com>

* [MM-44397] Restrict team creation based on subscription limits (#20282)

* restrict team creation based on limits

* Update api4/team.go

Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>

* Add additional field to teamsusage

* Fix

* remove useless test

* Fix error for team creation

* Remove apostrophe

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Vishal <vish9812@gmail.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
2022-05-31 15:06:54 -04:00
Ibrahim Serdar Acikgoz
a18934b042 config/diff: add utility function to get diffs scoped with struct tags (#20297)
* config/diff: add utility function to get diffs scoped with struct tags

* api4/config.go: check cloud accessible settings after merge
2022-05-31 17:10:32 +03:00
Vishal
d87fe35bdf [MM-44263] Cache Posts Usage (#20254)
* Fetch users only posts

* Cache Posts Usage

* Explicitly validate posts count before testing usage

* Add DocString

* Revert cache changes

* Revert "Revert cache changes"

This reverts commit ba693f8d5028b62c19f6a730e8dca73a224d0761.
2022-05-31 16:25:46 +05:30
Vishal
57e9aa767c [MM-44263] Only include user posts in post count (#20250)
* Fetch users only posts

* Explicitly validate posts count before testing usage
2022-05-31 14:18:41 +05:30
Alejandro García Montoro
b10ff1b1f7 MM-44221: Add admin console setting to enable/disable App Bar (#20224)
* Revert "[MM-39820] Add AppBarEnabled feature flag (#18967)"

This reverts commit ba1b279c5f.

* Add EnableAppBar admin setting

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 22:53:51 +02:00
Michael Kochell
ea5bfe3fd9 Cloud Freemium - Integrations (#20185)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-25 12:36:08 -04:00
Nick Misasi
50d069e86d [MM-44307] On Limits Change, archive or restore teams according to the limits (#20247)
Automatic Merge
2022-05-24 16:16:24 +03:00
Harshil Sharma
b13d5e7466 Added Archived column to FileInfo (#20164)
* Added Archived column to FileInfo

* fixed typo

* Added new column to store column list

* Fixing tests

* Updated migration number to syncup with master
2022-05-23 12:15:56 +05:30
Miguel de la Cruz
c100fc2135 Revert "config/diff: add utility function to get diffs scoped with struct tags (#20206)" (#20256)
Automatic Merge
2022-05-21 00:16:24 +03:00
Kyriakos Z
9a67ae9ac6 MM-38982: fixes SVG uploading (#20141)
* MM-38982: fixes SVG uploading

Uploading SVG files was "almost" treated like an image in some places,
resulting in not showing the SVG on the client.
This is happening because when we fail to generate a mini preview for an
image, we prepend "invalid-" to the MimeType.

This commit adds a check to guard against SVG files in methods that make
no sense for SVGs.

* Reverts invalid-{mimetype} fix

* Uses fileInfo.IsSvg() where it can
2022-05-20 10:26:21 -04:00
Vishal
2a9f78536f [MM-43798] Change default CRT option from Disabled to AlwaysOn (#20114)
* MM-32692 Add two more CRT options

* [MM-43798] Change CRT default to AlwaysOn

* Rename variable

* fix test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
2022-05-18 18:53:41 +02:00
Pablo Andrés Vélez Vidal
f08d65909f MM-43529 - start freemium trial (#20163)
* MM-43529 - start freemium trial

* change the method to put

* Add unit testing for the request-trial-endpoint

* use correct require

* add the translation texts

* fix texts

* remove unnecessary log

* change response status code to forbidden when non cloud

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
2022-05-18 10:19:38 +02:00
Agniva De Sarker
617007a56d MM-42379: Do not set TrustedProxyIPHeader for new instances (#20217)
We move away with the update logic and just set an empty
slice always.

```release-note
The value of ServiceSettings.TrustedProxyIPHeader will default
to empty from now on. A previous bug prevented this from happening
in certain conditions. Customers are requested to check for these
values in their config and set them to nil if necessary.
```
2022-05-18 13:02:55 +05:30