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

1343 Коммитов

Автор SHA1 Сообщение Дата
Agniva De Sarker
d447d9b64a Skip flaky TestTrialLicense (#18125)
https://mattermost.atlassian.net/browse/MM-36695

```release-note
NONE
```
2021-08-13 20:39:40 +05:30
Maria A Nunez
d5e61e8093 MM-36084 - Certificate Auth: Remove SAML dependency in license check (#18113) 2021-08-13 09:57:26 -04:00
Ben Schumacher
16d8640072 [MM-37760] Reduce export surface of client4 (#18102) 2021-08-13 14:02:07 +02:00
Ben Schumacher
a8ca5c423f [MM-37557] Move error out of client4 response (#18101)
* Return an error seperately from Response

* Remove BuildErrorResponse

* Drop Response.Error from model/client4.go

* Migrate require.Nil checks

* Migrate require.NotNil checks

* More manual fixes

* Move error check out of CheckOKStatus and CheckCreatedStatus

* Move error check out of CheckForbiddenStatus

* Move error check out of CheckUnauthorizedStatus

* Move error check out of CheckNotFoundStatus

* Move error check out of CheckBadRequestStatus

* Move error check out of CheckNotImplementedStatus and CheckRequestEntityTooLargeStatus

* Move error check out of CheckInternalErrorStatus

* Move error check out of CheckServiceUnavailableStatus

* Remove error check from checkHTTPStatus

* Remove remaining references to Response.Error

* Check previously unchecked errors

* Manually fix compile and linter errors

* Return error in CreateWebSocket methods

* Return error instead of *AppError in DoApi methods

* Manually fix bad replacments

* Conistently return Response and error

* Use err instead of seperate bool return value to indicate success

* Reduce ussage of model.AppError in web/oauth_test.go

* Remove client4.Must

* Check error in buf.ReadFrom

* Fix failing tests
2021-08-13 13:12:16 +02:00
Claudio Costa
96593580ae Add MaxImageResolution config setting (#17941) 2021-08-12 17:43:10 +02:00
Ben Schumacher
fd853e74a6 [MM-37755] Idiomatic naming (SMTP, TLS, TCP, XML, CSS, HTML, HTTP) (#18103) 2021-08-12 11:49:16 +02:00
Ben Schumacher
225565f412 [MM-37716] Drop support for LHS specific bot icons (#18087) 2021-08-12 00:27:35 +02:00
Claudio Costa
868b8d91db [MM-36318] Set bot profile image and icon only if they have changed (#18008)
* Set bot profile image and icon only if they have changed

* Move equality check to the app layer

* Use ioutil.ReadAll

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-08-11 09:37:52 +02:00
dave
16c2925ba2 Fix staticcheck errors from _test.go files (#18033)
Automatic Merge
2021-08-10 07:15:03 +02:00
Martin Kraft
21639f9c87 MM-22845: Added support for permalink previews. (#17796)
* MM-22845: Added support for permalink previews.

* MM-22845: Adds license to new file.

* MM-22845: Adds endpoint to retrieve multiple posts by id.

* MM-22845: Fix for deleted post.

* MM-22845: Adds config setting for permalink previews.

* MM-22845: Adds API test for new endpoint.

* MM-22845: Fix typo.

* MM-22845: Tests that post create or updated via App get the previewed_post prop.

* MM-22845: Tests for matching permalinks.

* MM-22845: Adds PreparePostForClient test for permalink previews.

* MM-22845: Embeds entire post in permalink metadata.

* MM-22845: Filter WS message payload of created and edited post based on permissions.

* MM-22845: Runs app layer generator.

* MM-22845: Lint check fix.

* MM-22845: Adds feature flag.

* MM-22845: Clones WS message.

* MM-22845: Removes knowledge of permalink from LinkMetadata table. Removes knowledge of user id from post embedding methods in favour of a 'sanitize' method/step.

* MM-22845: Handle nil post metadata.

* MM-22845: Switch to cloning post.

* MM-22845: Removes unused code.

* MM-22845: Refactor.

* MM-22845: Reverts whitespace change.

* MM-22845: Removes unnecessary code.

* MM-22845: Removes unnecessary function.

* MM-22845: Warn but don't error if permalinked referenced post or channel is not found.

* MM-22845: Fix for clone method.

* MM-22845: Fix for clone method.

* MM-22845: Updates translations.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-08-09 11:33:21 -04:00
Agniva De Sarker
2488b980e8 Remove deprecated *model.Client methods (#18042)
```release-note
Removed CheckUserMfa
Removed GetServerBusyExpires
```
2021-08-03 20:38:15 +05:30
Martin Kraft
37b1e6d048 MM-37417: Push notification authz fix. (#18009)
* MM-37417: Push notification authz fix.

* MM-37417: Tests new app method.
2021-07-28 13:47:45 -04:00
Agniva De Sarker
0d075c32db MM-22051: Remove ToJson from model (part 1) (#18005)
https://mattermost.atlassian.net/browse/MM-22051

```release-note
Removed the following methods/functions:
(ad *AccessData) ToJson()
(ar *AccessResponse) ToJson()
(ar *AnalyticsRow) ToJson()
(ar AnalyticsRows) ToJson()
(o *Audit) ToJson()
(o Audits) ToJson()
(ad *AuthData) ToJson()
(ar *AuthorizeRequest) ToJson()
(o *ChannelPatch) ToJson()
(o *ChannelsWithCount) ToJson()
(o *ChannelCounts) ToJson()
(o *ChannelData) ToJson()
(o *ChannelMembers) ToJson()
(o *ChannelUnread) ToJson()
(o *ChannelUnreadAt) ToJson()
(o *ChannelStats) ToJson()
(o *ChannelView) ToJson()
(o *ChannelViewResponse) ToJson()
(o *ClusterDiscovery) ToJson()
(ci *ClusterInfo) ToJson()
(cs *ClusterStats) ToJson()
(o *Command) ToJson()
CommandListToJson(l []*Command) string
(o *CommandArgs) ToJson()
(cmr *CommandMoveRequest) ToJson()
(o *CommandResponse) ToJson()
(c *Compliance) ToJson()
(c Compliances) ToJson()
(o *Config) ToJson()
EmojiListToJson(emojiList []*Emoji)
```
2021-07-28 13:15:46 +05:30
Claudio Costa
75d6480393 [MM-37108] Fix possible nil dereference in team edition (#17933)
* Fix possible nil dereference

* Fix translation

* Switch to StatusForbidden

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-07-27 13:07:40 +02:00
Claudio Costa
186475db3b [MM-35470] Disable config watching logic (#17913)
* Disable config watching logic

* Fix tests
2021-07-26 20:13:30 +02:00
Agniva De Sarker
7be61af24f MM-25516: Changed to byte slice instead of string for cluster messages (#17998)
* MM-25516: Changed to byte slice instead of string for cluster messages

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

Testing:
Manually tested.
Load-tested with Cluster Controller.

I looked into changing the serialization method to use msgpack,
but the ClusterMessage struct was mainly used for only 3 fields
which didn't lead to much of a CPU time improvement, whereas
actually led to more allocations using msgpack. Hence, I chose
to remain with JSON.

```
name              old time/op    new time/op    delta
ClusterMarshal-8    3.51µs ± 1%    3.10µs ± 2%  -11.59%  (p=0.000 n=9+10)

name              old alloc/op   new alloc/op   delta
ClusterMarshal-8      776B ± 0%     1000B ± 0%  +28.87%  (p=0.000 n=10+10)

name              old allocs/op  new allocs/op  delta
ClusterMarshal-8      12.0 ± 0%      13.0 ± 0%   +8.33%  (p=0.000 n=10+10)
```

```release-note
Changed the field type of Data in model.ClusterMessage to []byte from string.
```

* Trigger CI
```release-note
NONE
```
2021-07-26 13:41:20 +05:30
Agniva De Sarker
23800326a0 MM-22051: Remove ToJson methods from network writes (#17999)
We replace the double conversion of
[]byte to string, with a direct write
to http.ResponseWriter.

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

Tried using gofmt -r, but it only accepts Go
expressions. So had to resort to an ugly sed replace

sed -E -i 's/w.Write\(\[\]byte\((.*).ToJson\(\)\)\)/if err := json.NewEncoder\(w\).Encode\(\1\); err != nil { mlog.Warn\("Error while writing response", mlog.Err\(err\)\)}/g' *.go

```release-note
NONE
```
2021-07-26 13:41:02 +05:30
Allan Guwatudde
e252608068 [MM-37064] - Onboarding flow is showing for existing users (#17977)
* [MM-37064] - Onboarding flow is showing for existing users

* add tests

* fix typo

* fix lint

* fix tests
2021-07-23 19:54:51 +03:00
Agniva De Sarker
a49e78b1d4 MM-22051: Remove FromJson part 2 (#17981)
```release-note
Removed the following functions:
ChannelsWithCountFromJson
ChannelFromJson
ChannelPatchFromJson
ChannelModerationsFromJson
ChannelModerationsPatchFromJson
ChannelMemberCountsByGroupFromJson
ChannelCountsFromJson
ChannelDataFromJson
ChannelListFromJson
ChannelSliceFromJson
ChannelListWithTeamDataFromJson
ChannelMembersFromJson
ChannelUnreadFromJson
ChannelUnreadAtFromJson
ChannelMemberFromJson
ChannelSearchFromJson
SidebarCategoryFromJson
SidebarCategoriesFromJson
OrderedSidebarCategoriesFromJson
```

https://mattermost.atlassian.net/browse/MM-22051
2021-07-23 12:35:59 +05:30
Joram Wilander
a0cc420e2a MM-35392 Load thread unreads for other teams on app load (#17944)
* Add ability to include thread unreads in team unreads api response

* Do not include GMs/DMs in team unreads for threads

* Fix bad merge
2021-07-22 10:24:20 -04:00
Agniva De Sarker
c4b4e1bc38 MM-36271: Bump major version to 6.0 (#17973)
https://mattermost.atlassian.net/browse/MM-36271

```release-note
We bump the major version to 6.0
```
2021-07-22 12:21:47 +05:30
Agniva De Sarker
e199eba313 Remove FromJSON functions (Part 1) (#17961)
* Remove FromJSON functions (Part 1)

```release-note
Removed the following functions:
AccessDataFromJson
AccessResponseFromJson
AnalyticsRowFromJson
AnalyticsRowsFromJson
AuditFromJson
AuditsFromJson
AuthDataFromJson
AuthorizeRequestFromJson
BotFromJson
BotPatchFromJson
BotListFromJson
```

* fix tests

```release-note
NONE
```
2021-07-21 16:38:39 +02:00
Agniva De Sarker
7454680be5 Cleanup model/utils.go (#17945)
* Cleanup model/utils.go

- Removed some functions which were unsued. (The unused linter was somehow failing to catch this).
- Moved some functions inside other packages.
- Removed two duplicate instances of the same function - RemoveDuplicateStrings and UniqueStrings.
- Moved some regexes to global vars to prevent compilation every time.

```release-note
NONE
```

* fix lint

```release-note
NONE
```

* bring back unused exception

```release-note
NONE
```

* fix tests

```release-note
NONE
```

* Address review comments

```release-note
NONE
```
2021-07-21 16:38:39 +02:00
Martin Kraft
77f9620997 MM-36085: Split out System/Team Schemes from license feature checks. (#17727)
* MM-36085: Removes permissions whitelist for unlicensed instances.

* MM-36095: Removes invalidated test.

* Translations update from Weblate (#17947)

* Translated using Weblate (French)

Currently translated at 95.1% (2207 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/fr/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/

* Translated using Weblate (Bulgarian)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/

* Translated using Weblate (Turkish)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

Translated using Weblate (Turkish)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/

* Translated using Weblate (German)

Currently translated at 83.7% (1943 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (German)

Currently translated at 83.7% (1943 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (German)

Currently translated at 84.2% (1953 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/

* Translated using Weblate (Dutch)

Currently translated at 100.0% (2319 of 2319 strings)

Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/nl/

Co-authored-by: wget <william@gathoye.be>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: LukasFiniarel <olli94fish@hotmail.de>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Split package target into per platform (#17692)

Currently the `package` make target handles all three platforms -
Windows, OSX and Linux. While doing it in surprisingly serial mode.

Split it up in 3, so that things are a bit faster and people can package
only what they need.

v2: Rebase (platform was removed)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Co-authored-by: Emil Velikov <emil.velikov@collabora.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: wget <william@gathoye.be>
Co-authored-by: kaakaa <stooner.hoe@gmail.com>
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com>
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu>
Co-authored-by: Kaya Zeren <kayazeren@gmail.com>
Co-authored-by: LukasFiniarel <olli94fish@hotmail.de>
Co-authored-by: JtheBAB <srast@bioc.uzh.ch>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Tom De Moor <tom@controlaltdieliet.be>
Co-authored-by: Emil Velikov <emil.l.velikov@gmail.com>
Co-authored-by: Emil Velikov <emil.velikov@collabora.com>
2021-07-21 16:38:39 +02:00
Agniva De Sarker
da7d71ccf7 MM-21357: Use typed constant for channel types (#17928)
* MM-21357: Use typed constant for channel types

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

```release-note
- Introduced a new type ChannelType for all channel types.
- Updated the Client4.UpdateChannelPrivacy method to ChannelType.
```

* Address review comments

```release-note
NONE
```

* telemetry fix

```release-note
NONE
```
2021-07-21 16:38:39 +02:00
Agniva De Sarker
623f8dc9af MM-21357: Use typed constants ClusterEvent (#17920)
* MM-21357: Use typed constants ClusterEvent

Use typed constants for:
- model.ClusterEvent

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

```release-note
Use typed constant for model.ClusterEvent
```

* trigger CI
```release-note
NONE
```
2021-07-21 16:38:39 +02:00
Agniva De Sarker
f35b025bea Unexport fields in WebSocketEvent (#17912)
Automatic Merge
2021-07-21 16:38:39 +02:00
Ben Schumacher
97ccf0bdf6 [MM-16751] golint model (#17896) 2021-07-21 16:38:39 +02:00
Ibrahim Serdar Acikgoz
41dc05a6bd Decouple emailservice from app package (#17827)
* decouple emailservice from app package

* fix some escaped errors

* move email package under app directory

* fix i18n

* reflect review comments
2021-07-19 23:26:06 +08:00
Nick Misasi
304d655bb3 Add a return in 2 places (#17942)
* Add a return in 2 places

* Missed return
2021-07-16 11:05:43 -04:00
Agniva De Sarker
c28b2fa269 MM-36411- Skip flaky TestUpdateConfigDiffInAuditRecord (#17927)
* MM-36411- Skip flaky TestUpdateConfigDiffInAuditRecord

The fix in https://github.com/mattermost/mattermost-server/pull/17777
doesn't seem to have worked fully as this was seen again.

Skipping it for now until we revisit this.

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

```release-note
NONE
```

* Doing a file sync

```release-note
NONE
```

* Changed flush order

```release-note
NONE
```
2021-07-15 21:31:54 +05:30
Miguel de la Cruz
f2099ec00b [MM-33538] Trims space from user email when sanitizing user input (#17168)
Automatic Merge
2021-06-30 18:05:02 +02:00
Agniva De Sarker
97e3c550a4 Use forked version of gziphandler (#17852) 2021-06-30 14:39:28 +05:30
Joram Wilander
faf9e8725b MM-35297 Add the ability to control if thread is followed when marking post as unread and don't autofollow from API (#17799)
* Add the ability to control if thread is followed when marking post as unread and don't autofollow from API

* Fix style
2021-06-18 15:54:17 -04:00
Harshil Sharma
e4aa729a0c MM-34437 Preventing infinite trial requests (#17472)
* MM-34434: Added 'is_trial' boolean to all trial license requests and to the License struct.

* MM-34434: Generalized the concept of a license request.

* MM-34434: Verifies JSON field of license instance is set.

* MM-34434: Added missing client param.

* MM-34434: Added some tests of the request trial API endpoint.

* MM-34434: Removed comment.

* fix broken test (#17348)

* Add missing wrapped errors (#17339)

* Improve document extraction and including a document extraction command (#17183)

* Add extract documents content command

* Adding the extraction command and making the pure go pdf library as secondary option

* Improving the memory usage and docextractor interface

* Enable content extraction by default in all the instances

* Tiny improvement on archive indexing

* Adding App interface generation and the opentracing layer

* Fixing linter errors

* Addressing PR review comments

* Addressing PR review comments

* Update en.json (#17356)

Automatic Merge

* adding new feature flag (#17308)

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Bump no_output_timeout to 2 hours (#17358)

* log invalid username (#17345)

Automatic Merge

* MM-34434: Added missing client param.

MM-34434: Added some tests of the request trial API endpoint.

MM-34434: Removed comment.

* MM-34434: Switched to a hard-coded true value.

* MM-34434: Reverts test change.

* MM-34434: Removes unnecessary field.

* MM-34434: Tests that is_trial is hard-coded by TrialLicenseRequest.

* MM-34434: Removed accidental commit.

* MM-34434: Removes unnecessary is_trial key from JSON payload.

* MM-34434: Reverts to old pointer receiver variable name.

* MM-34434: Removes test.

* #MM-34437 Initialized license service

* ##MM-34437 Verified at all points if server is trial elligible

* WIp

* #MM-34437 removed unused commented code

* MM-34437 make a log less severe

* #MM-34437 generated einterface mocks

* #MM-34437 added license on new file

* #MM-34437 removed unused translation

* #MM-34437 some refactoring

* Update api4/license.go

* Update api4/license.go

* #MM-34437 made a variable name consistent

* #MM-34437 Added mocks for lince validator

* #M--34437 Added license validator test framework

* #MM-34437 Renamed isTrial method to isTrialLicense to avoid conflict with newlya dded field

* #M--34437 Allowed sales-sanctioned trials

* #MM-34437 fixed trial license API tests

* Added tests for add license API

* #MM-34437 fixed ValidateLicense test

* #MM-34437 Added util tests

* #MM-34437 using NoError for checking no error

* #MM-34437 using NoError for checking no error

* Added dummy piblic key for testing

* Fixed tests

* #MM-34437 udpaetd trial license URL for testing

* #MM-34437 adjusted times for licences generated through admin portal

* Reverted test-only changes

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: Amy Blais <amy_blais@hotmail.com>
Co-authored-by: Ben Cooke <benkcooke@gmail.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Max Erenberg <max.erenberg@mattermost.com>
2021-06-17 17:37:34 +05:30
darkLord19
b0bdd23d2c [MM-8497] Ability to set Do Not Disturb for a specified period of time (#17680)
* Revert "Revert "[MM-8497] Ability to set Do Not Disturb for a specified period of time (#16067)" (#17657)"

This reverts commit ff383990f8.

* add debug log for recurring function

* add feature flag for dnd timed status

* refactoring changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-06-16 14:38:26 -04:00
Joram Wilander
d0778486ad MM-35396 Refactor GetThreadForUser store func to take membership as argument to prevent replica lag issues and reduce joins in query (#17754)
* Update store function GetThreadForUser to use master DB to fix replica lag

* Refactor GetThreadForUser store func to take membership as argument to prevent replica lag issues and reduce joins in query

* Add translation

* Fix test

* Updates per feedback

* Minor clean-up per feedback
2021-06-14 12:33:08 -04:00
Claudio Costa
0ae307808a [MM-36411] Fix flaky TestUpdateConfigDiffInAuditRecord (#17777)
* Fix flaky test

* Force log flush only
2021-06-14 16:42:09 +02:00
Martin Kraft
ef2c97a5ec MM-34434: Trial license flag (#17359)
* MM-34434: Added 'is_trial' boolean to all trial license requests and to the License struct.

* MM-34434: Generalized the concept of a license request.

* MM-34434: Verifies JSON field of license instance is set.

* MM-34434: Added missing client param.

* MM-34434: Added some tests of the request trial API endpoint.

* MM-34434: Removed comment.

* fix broken test (#17348)

* Add missing wrapped errors (#17339)

* Improve document extraction and including a document extraction command (#17183)

* Add extract documents content command

* Adding the extraction command and making the pure go pdf library as secondary option

* Improving the memory usage and docextractor interface

* Enable content extraction by default in all the instances

* Tiny improvement on archive indexing

* Adding App interface generation and the opentracing layer

* Fixing linter errors

* Addressing PR review comments

* Addressing PR review comments

* Update en.json (#17356)

Automatic Merge

* adding new feature flag (#17308)

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Bump no_output_timeout to 2 hours (#17358)

* log invalid username (#17345)

Automatic Merge

* MM-34434: Added missing client param.

MM-34434: Added some tests of the request trial API endpoint.

MM-34434: Removed comment.

* MM-34434: Switched to a hard-coded true value.

* MM-34434: Reverts test change.

* MM-34434: Removes unnecessary field.

* MM-34434: Tests that is_trial is hard-coded by TrialLicenseRequest.

* MM-34434: Removed accidental commit.

* MM-34434: Removes unnecessary is_trial key from JSON payload.

* MM-34434: Reverts to old pointer receiver variable name.

* MM-34434: Removes test.

Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: Amy Blais <amy_blais@hotmail.com>
Co-authored-by: Ben Cooke <benkcooke@gmail.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Max Erenberg <max.erenberg@mattermost.com>
2021-06-11 17:20:41 -04:00
Caleb Roseland
364ea5ed63 MM-36054: send reply_count with following ws event (#17683)
* send reply_count with following ws event

* add test

* code suggestion
2021-06-09 19:37:25 +02:00
Miguel de la Cruz
72c86448b9 [MM-27622] Publish messages as SystemBot when a user is required (#17598)
Automatic Merge
2021-06-09 17:40:22 +02:00
Kyriakos Z
12e439a98d MM-35805: following a thread should mark it as read (#17717)
Currently upon following a thread the thread is unread,
this commit changes that by explicitly marking it as read.
2021-06-07 20:49:24 +03:00
Allan Guwatudde
5ce5ea93f4 [MM-36198] - Activating a user in System Console does not respect cloud user limits (#17719)
* [MM-36198] - Activating a user in System Console does not respect cloud user limits

* feedback impl

* improve error check
2021-06-07 17:38:33 +03:00
Mohammed Salman
78a9927b67 remove direct store calls (#17330)
Automatic Merge
2021-06-06 17:40:22 +02:00
Manoj
226e60810f Custom status expiry (#17570)
* Added expiry support in custom status APIs (#11)

* Added expiry support in custom status APIs
Added validation for the duration and expiration time in request body
Made enum for the custom status durations

* Fixed the bug in expiry validation with dont clear validation

* Fixed review comments
Converted the durations enum to map
Removed extra if-else

* Added expiry support in custom status slash command (#17)

* Added expiry support in custom status slash command

* Added the check for timezone enabled in expiry time in custom status slash command

* Review fixes
Changed name of calculateExpriryTime to calculateEndOfDay
Made function SetDefaultEmoji for settting default emoji in set custom status API

* Added support for empty duration in custom status APIs
Made one of emoji and text required and duration optional in set custom status API
Made default duration dont clear in both API and slash command

* Changed value of ExpiresAt field in custom status slash command

* Code refactoring
Combined SetDefaults and TrimMessage into 1 function PreSave
Refactored isExpirationTimeValid function

* Used model variables instead of new variables in custom status slash command

* Modified behaviour of set custom status APIs (#19)

Removed dont_clear from validCustomStatusDuration map
Added logic to set duration custom date/time if only expires_at is specified in the body
Made function AreDurationAndExpirationTimeValid in custom status model

* Trigger CI build
2021-05-27 14:06:04 -03:00
Nick Misasi
4b6e73c1c4 [MM-35625] Add controller for changing cloud subscription (#17676)
* Add a controller for changing subscription

* Changes for PR

* Another change

* Fix pipeline

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-05-27 09:12:47 -04:00
Eli Yukelzon
46649292f8 MM-34758 Collapsed Reply Threads without mobile support (#17424)
Summary
added support for legacy clients accessing server
added collapsed_threads_supported param to viewChannel API and setPostUnread API

Ticket Link
https://mattermost.atlassian.net/browse/MM-34758

Related Webapp PR
mattermost/mattermost-webapp#7933
2021-05-26 20:40:25 +05:30
Ben Cooke
3960d29bb4 [MM-34303] Add team ID to response when linking a channel to a group (#17576)
* add team ID to channel group response

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-05-26 10:12:34 -04:00
Ashish Bhate
a95f90cec7 MM-34895: LastViewed should be updated correctly for new thread membership (#17673)
Summary
Update LastViewed correctly for new thread membership

Ticket Link
https://mattermost.atlassian.net/browse/MM-34895
2021-05-25 18:51:42 +05:30
Ashish Bhate
6f5e14dd5e MM-3543/MM-35436: fix thread being marked unread when updating reply post (#17645)
Summary
Threads should not be returned as unread if a reply post has been edited or reacted to since the time the thread was last viewed

Ticket Link
https://mattermost.atlassian.net/browse/MM-35436
https://mattermost.atlassian.net/browse/MM-35437
2021-05-25 17:08:14 +05:30