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

3035 Коммитов

Автор SHA1 Сообщение Дата
Martin Kraft
a46840e96b MM-45395: Exclude bot and webhook posts from Top Team Channels. Exclude webhook posts from My Top Channels. (#20599)
* MM-45395: Exclude bot and webhook posts from Top Team Channels. Exclude webhook posts from My Top Channels.

* MM-45395: Adds missing error test.

* MM-45395: Adds missing whitespace.
2022-07-11 08:58:40 -04:00
Nathaniel Allred
f639122376 Usage: Round messages to 1K, files to 100MB (#20603) 2022-07-11 07:21:29 -05: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
Nathaniel Allred
ad181532af ComputeLastAccessiblePostTime returns error interface (#20598) 2022-07-07 15:01:50 -05: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
Lev
c62d4bee5f Moved UserHasJoinedTeam callback to after the processing (#20410)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-05 16:51:22 -07:00
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
Julien Tant
b45ff0be5d [MM-44159] Add user sort by admin status in channels (#20562) 2022-06-30 09:20:14 -07:00
Doug Lauder
91877c3016 Add Store service for Focalboard multi-product architecture (#20568)
* add Store service
2022-06-30 08:28:37 -04: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
dad8eab777 [MM-45159] - Flaky test: TestCreateUserWithInitialPreferences (#20557)
* [MM-45159] - Flaky test: TestCreateUserWithInitialPreferences

* fix assertion order
2022-06-30 09:23:31 +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
Collin Eng
83b4e7285e [MM-36872] add threading headers to notification emails (#18232)
* [MM-36872] Adding headers for mail threading

* MM-36872 Add message id and mail threading headers

* MM-36872 Add message id and mail threading headers

* MM-36872 Add msgId, inreplyto, references headers

* Fixing comment issues

* Applying gofmt lint fixes

* Applying gofmt lint fixes

* MM-36872: Updates required from merge.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Martin Kraft <martin@upspin.org>
2022-06-29 15:29:29 -04:00
Doug Lauder
7e4024665c Add KVStore service and Log service for Focalboard multi product architecture (#20563)
* add KVStore service, add Log service
2022-06-29 09:08:34 -04:00
Ibrahim Serdar Acikgoz
90c687b728 plugin/product: improve product hooks API (#20556)
* plugin/product: improve product hooks API

* elaborate HookService.RegisterHooks method documentation

* remove unnecessary re-assigns
2022-06-29 16:01:19 +03:00
Daniel Schalla
fe23501d40 Enforce Password Requirements on DevMode (#20378) 2022-06-29 09:00:46 +02:00
Agniva De Sarker
bd6acf04a9 GraphQL: Create dedicated top-level filter for sidebar categories (#20353)
We add the excludeTeam switch to allow user to get
all sidebar categories from other teams excluding a given team.

```release-note
NONE
```
2022-06-28 20:28:50 +05:30
Doug Lauder
5544e753e8 Add FileInfoStore and Cloud services for Focalboard multi product architecture (#20546)
* add FileInfoStore and Cloud services
2022-06-27 14:32:27 -04: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
Tim Scheuermann
49bd76632b MM-45039 create mctx package (#20505)
Thanks to @agnivade and @isacikgoz for their input
2022-06-23 17:07:02 +02: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
Ibrahim Serdar Acikgoz
4b5d56a8c2 review some possible nil error panics (#20518) 2022-06-23 12:54:46 +03:00
Agniva De Sarker
4dd2b5f039 MM-44953: Refactor EnsureBot to be used from plugin.API (#20521)
The mattermost-plugin-api code also needs to use this.
Hence we make it available from plugin.API.

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

```release-note
NONE
```
2022-06-22 14:06:00 +05:30
Barış
ccab5be6c4 Mm-20223 Add webp emoji support (#20283)
* Added webp package into app/emoji.go , also added a test

* fixed import order inside emoji.go

* Ran go mod tidy

* Conversion to png for Webp emojis that must be resized is implemented

* Deleted unused import

* Added reading mechanism for webp instead of creating

* fileutils and filepath are used while reading a webp file during test

* Deleted readtestwebp function and put it in emoji_test as requested

* Added webp image upload test inside api4/file_test.go

* Expect image is changed from false to true

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-21 10:08:02 +05:30
Doug Lauder
f1ddd3ad38 Revert PR checking for GetUser returning nil,nil (#20508)
Reverts the PR https://github.com/mattermost/mattermost-server/pull/20501 which was added for SET escalation.

It was determined that the plugins call to GetUser never made it to the app layer.
2022-06-20 12:39:45 -04:00
Agniva De Sarker
076454b4f3 MM-45159: Skip flaky TestCreateUserWithInitialPreferences (#20489)
https://mattermost.atlassian.net/browse/MM-45159

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-20 21:33:28 +05:30
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
Doug Lauder
d4c48139b5 Check for nil,nil returned from GetUser (#20501)
* check for nil,nil returned from GetUser

* add logging
2022-06-17 19:01:50 -04:00
Nathaniel Allred
d43c06ea75 remove freemium feature flag (#20491) 2022-06-17 11:13:22 -05:00
Nick Misasi
cecbcbc8a8 [MM-44887] Consistency in "next billing date" (#20423)
* if there is no trial end date, use the current date for the upgrade confirmation email

* changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-16 15:58:07 -04: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
Agniva De Sarker
f15873eaf4 MM-43871: Fix flaky TestCreatePostAsUser (#20484)
We need to flush the logger before checking
the log results. Without that, sometimes
it would get logged after checking the line,
as can be seen in the JIRA ticket.

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

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-16 14:17:01 +05:30
Agniva De Sarker
c7aa2fdbb5 MM-43832: Fix flaky TestReadReplicaDisabledBasedOnLicense (#20483)
The config store was incorrectly initialized. Other than that,
I don't think there is any "flakyness" in the test.

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

```release-note
NONE
```
2022-06-16 12:34:08 +05:30
Tim Scheuermann
eb034fc981 MM-44236 Update server dependencies (#20444) 2022-06-16 08:50:55 +02: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
José Peso
48a9234d69 websocket: drop less important events before they are queued (#20326)
Discard the non-essential WebSocket events before they are queued.

When conn send queue is full, the connection is closed. There are messages that are being dropped by the current mechanism when send queue is at 50% capacity. This change makes the messages drop before entering the queue in order to keep the queue as empty as possible.

The value of the length of the queue could not be 100% accurate since we are reading from the hub goroutine, but it will be accurate enough to avoid some events.
2022-06-14 09:35:22 +02: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
Claudio Costa
d317923143 Fix flaky TestUploadDataConcurrent (#20445) 2022-06-13 09:52:10 +02:00
Ibrahim Serdar Acikgoz
39991d236b Add Product Interfaces (#20403)
* app: improve plugin interfaces

* add documentation

* improve doc

* add error id

* add more info to readme
2022-06-13 09:36:43 +03: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
Julien Tant
35d473b3a0 [MM-44995] remove reference to 30 days trial in welcome email (#20425) 2022-06-09 16:01:24 -07:00
Michael Kochell
e18b1cf89f Check for cloud license and CWS error when checking integration freemium limits (#20387)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-09 15:57:02 -04:00
Agniva De Sarker
dce96046dd MM-42714: Trim token sizes to 50 characters (#20412)
https://mattermost.atlassian.net/browse/MM-42714

```release-note
NONE
```
2022-06-09 14:56:26 +05:30
Guillermo Vayá
c6f80dfe0a [MM-44573] Sanitize options (#20380)
Automatic Merge
2022-06-09 00:36:28 +03: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
Kyriakos Z
5396c530bf MM-42581: fixes unread threads on user channel add (#20181)
* MM-42581: fixes unread threads on user channel add

Currently when we are adding a user to a channel we don't send previous
values for unread replies and mentions. This is resulting the thread to
not be marked as unread in the UI, since we rely on the previous values
for that.

This commit fixes the issue by returning previous unread values of 0.

* Adds test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-08 14:01:58 -04:00