Commit Graph

10598 Commits

Author SHA1 Message Date
Daniel Fiori
8d56fcf568 Add library and command for human-readable logs (#9809)
* Update logrus to 1.2 and add as a direct dependency

* Create an mlog/human package for pretty-printing logs

This package can read JSON logs from mattermost.log, and output the data to
either logrus or a custom formatter, to make the logs more human readable.

* Create a command for outputting human-readable logs

This command will read JSON data from mattermost.log or stdin, and
output in a human readable format. An optional argument can be used
to activate logrus output (which includes color support).

* Reorganize code in mlog/human and improve logrus timestamp formatting
2018-11-08 10:23:07 -08:00
Hanzei
e67d89b9a8 Add plugin methods to plugin API (#9744) 2018-11-08 10:17:07 -08:00
Harrison Healey
fab63f8ba2 MM-12829 Check message attachments for emojis for post metadata (#9797) 2018-11-08 10:47:35 -05:00
Christian Claus
93e581d642 Add plugin API for UploadFile method (#9684)
* Add plugin API for UploadFile method

* Add minimum server version documentation to plugin API UploadFile function

* Reorganize some imports
2018-11-07 21:24:54 +01:00
Christian Claus
6d4421d18a Add GetTeamsUnreadForUser to plugin api (#9659)
* Add GetTeamsUnreadForUser to plugin api

* Remove teamIdToExclude from plugin method GetTeamsUnreadForUser

* Add minimum server version to plugin API doc of GetTeamsUnreadForUser
2018-11-07 20:23:02 +01:00
Christopher Speller
ecade2f1ec MM-12849 Moving all non request scoped items to Server struct (#9806)
* Moving goroutine pool

* Auto refactor

* Moving plugins.

* Auto refactor

* Moving fields to server

* Auto refactor

* Removing siteurl duplication.

* Moving reset of app fields

* Auto refactor

* Formatting

* Moving niling of Server to after last use

* Fixing unit tests.
2018-11-07 10:20:07 -08:00
Wasim Thabraze
0dcbecac87 Added MinimumNArgs to required commands in channels.go and team.go (#9792)
Removed arguments length comparison as MinimumNArgs would handle it.

Addressed code review
2018-11-06 11:20:49 +00:00
Christopher Speller
418a0ec10e Fixing formatting. (#9801) 2018-11-06 16:28:55 +08:00
Carlos Tadeu Panato Junior
46dd243331 upgrade to 5.5 (#9798)
* upgrade to 5.5

* add 5.6 upgrade db
2018-11-05 21:38:30 +01:00
Jason Mojica
1aa3ceccc2 MM-12355: Add CLI command "command create" revision (#9734)
* Check for admin only setting and user admin status.

If "EnableOnlyAdminIntegrations" is true, will only allow team admins
to create slash commands

* Add test for non-admin user

* Simplify permissions check

* Change error message

* Fix test
2018-11-05 14:55:31 +00:00
Vaibhav Thakkar
f6b1ccbcb1 Added GETEmojilist plugin api (#9750)
* Add GetEmojiList plugin api

* Fixed bug in getemojilist causing build test failure

* Fix linting error

* Add requested changes

* Fix all conflicts
2018-11-05 08:50:08 -05:00
Hanzei
789b2f72dd GH-9737: Allow setting min_server_version in plugin manifest (#9743)
* Add github.com/blang/semver as vendor

* Add MinServerVersion check for plugins

* Add tests for MinServerVersion in manifest

* Move logic to model/manifest.go & add tests
2018-11-05 08:29:25 -05:00
Shobhit Gupta
bce7a7c73d [MM-12462] Include favorite channels in bulk export (#9692)
* Include favorite channels in bulk export

* Remove duplicate method
2018-11-05 13:18:00 +00:00
Saturnino Abril
90f279c7d5 [MM-12805] Remove ephemeral post after leaving a channel (#9772)
* remove ephemeral post after leaving a channel

* remove unnecessary debugging line
2018-11-05 17:39:46 +08:00
Kerry Dougherty
c155359e58 MM-12369 Add Create Outgoing Webhook Command (#9779)
* add create outgoing webhook command

* add create outgoing webhook command
2018-11-02 13:39:38 -04:00
Jesse Hallam
04a6a779e2 MM-12708: tack on signin_change when completing email to saml change (#9776) 2018-11-02 08:22:15 -07:00
William Gathoye
509ecf4345 Add link to Freenode (#9785) 2018-11-01 17:29:35 -04:00
Harrison Healey
00eae6a26b Fix conflicts 2018-11-01 16:01:24 -04:00
Harrison Healey
ba173414d9 MM-12826 Include list of reactions in post metadata instead of just counts (#9749) 2018-11-01 15:41:43 -04:00
Harrison Healey
2190c37359 MM-12036 Add image dimensions for other fields in message attachments (#9748) 2018-11-01 15:41:37 -04:00
Harrison Healey
18684dd6de MM-11868/MM-12010/MM-12011/MM-12036 Improve post metadata structure (#9693)
* MM-11868/MM-12010/MM-12011/MM-12036 Include dimensions for opengraph and message attachment images in post metadata

* Remove duplicate check from getFirstLinkAndImages

* Add tests for getImagesInMessageAttachments

* Rename PostMetadata.FileInfos to PostMetadata.Files

* Rename Metadata.ImageDimensions to Metadata.Images
2018-11-01 15:41:29 -04:00
Harrison Healey
3929cb0141 Replace App.HTTPClient calls after merge (#9387)
* Replace App.HTTPClient calls after merge

* Add missing import
2018-11-01 15:25:23 -04:00
Harrison Healey
2959b53d98 MM-11272 Add OpenGraph and image dimension metadata to posts (#9313)
* Move OpenGraph code into its own file

* Move OpenGraph image proxying to app layer

* Move test file code out of api4 package

* MM-11272 Add OpenGraph and image dimension metadata to posts
2018-11-01 15:25:11 -04:00
Harrison Healey
48f16b6401 MM-11272 Added initial post metadata (#9175)
* MM-11272 Added app.PreparePostForClient

* MM-11272 Added app.PreparePostListForClient

* MM-11272 Added EmojiStore.GetMultipleByName

* MM-11272 Added emojis to PreparePostForClient

* MM-11272 Added unit tests for getting reaction counts

* MM-11272 Added unit tests for TestPreparePostForClient

* MM-11272 Added emojis from reactions to Post.Emojis

* MM-11272 Always update post.UpdateAt when reactions change to bust cache

* Fixed merge conflicts

* Moved post metadata-related code into its own file

* Update store mocks

* Fixed typo

* Add missing license headers

* Updated post metadata tests when custom emojis are disabled

* Fix unreliable unit tests

* Fix inconsistent casing in SQL statements

* Fix blank line

* Invalidate store cache after making changes

* Clear post cache synchronously with reactions
2018-11-01 15:22:33 -04:00
Shobhit Gupta
2e945e287d [MM-12461] Include the per-channel NotifyProps for Users in Bulk Export (#9773)
* Add per channel notify props to bulk export

* Check if key exists before assigning
2018-10-31 11:43:47 -07:00
Kautilya Tripathi
e0f5ee97b4 fixes #9611 (#9664) 2018-10-31 21:29:20 +08:00
Carlos Tadeu Panato Junior
dc24e91fae enable push notifications to use TPNS by default (#9774) 2018-10-31 08:35:07 -04:00
George Goldberg
8d3cfc6ad7 MM-12815: Clearly deprecated disused config settings. (#9751)
* MM-12815: Clearly deprecated disused config settings.

* Fix tests.
2018-10-31 08:38:38 +00:00
Chris Duarte
f23eeb56c7 Fix for OOO bug that reply message does not get inserted consistently. (#9742) 2018-10-30 14:30:15 -07:00
Christopher Speller
5d6c686d80 Fixing race in plugin HandleHTTP. (#9754) 2018-10-30 08:57:58 -07:00
Carlos Tadeu Panato Junior
4132351b3f fix panic in TestUpdateUserAuth test (#9756) 2018-10-30 09:40:54 -04:00
Hanzei
a8b867cd52 Migrate to idiomatic error handling in app/team.go (#9701) 2018-10-30 11:55:59 +00:00
Mukul Rawat
2b6d6acb78 [MM-12361] Create CLI-command "config set" (#9535) (#9582)
* Create the config set command in the variable

* Register the command and declare the command in the run function

* Finish implementation of 'config set' cli command

* Write tests for config set command

* Change minimum number of arguments to 2

* Correct changes

* Correct error problem

* Update the command description and errors

* Refactor function name and improve error messages

* Write test for UpdateMap function
2018-10-29 09:29:15 +00:00
Jesse Hallam
937b6480d5 MM-12342: merge the experimental channel store (#9681)
* MM-12342: merge the experimental channel store

* gofmt after upgrading to go 1.11
2018-10-25 13:25:27 -04:00
Jason Mojica
1074a1c7ab GH-9612 Add plugin API for GetChannelStats method (#9627)
* Add GetChannelStats plugin api

* Fix to return channel stats correctly

* Add server version; Handle error idiomatically
2018-10-25 13:24:43 -04:00
Ty Smith
dd60ad0db7 Update Twitter Handle in Readme (#9738)
Move from old to new Twitter Handle, "MattermostHQ" to "MatterMost".
2018-10-25 22:44:41 +08:00
Jason Mojica
a9ee2e01c5 GH-9617 Add plugin API for GetEmoji method (#9656)
* Add GetEmoji plugin api

* Add server version
2018-10-25 09:54:10 -04:00
Vadim
54b7a29581 MM-12459 Include User Notify Props in the Bulk Export (#9724) 2018-10-24 07:34:43 -07:00
Harrison Healey
159c2a44dc MM-10987 Turn on ExperimentalLimitClientConfig by default and remove setting (#9696) 2018-10-24 11:52:53 +01:00
Chris Duarte
7393d23261 Fix display of timestamp on generic email. This is a regression. (#9725) 2018-10-24 15:17:37 +08:00
Shobhit Gupta
c317d6f265 MM-12356 Add cli command "command delete" (#9553)
* Add cli command for deleting commands

* Add code/test for delete command

* Fix test

* Add confirm flag

* Update as per comments

* Uncomment test

* Fix test
2018-10-23 12:19:10 +01:00
Sergey Shpak
6232ff3738 Migrate to idiomatic error handling in app/slackimport.go (#9694)
* MM-12610 Migrate to idiomatic error handling in the file  in the mattermost-server repo (#9686)

*  MM-12610 Migrate to idiomatic error handling in the file in the mattermost-server repo (mattermost#9686)

*  MM-12610 Migrate to idiomatic error handling in the file in the mattermost-server repo (#9686)
2018-10-23 11:36:24 +01:00
Hanzei
cd4abefecd Migrate to idiomatic error handling in app/user.go (#9711) 2018-10-22 19:30:27 +01:00
Jason Simmons
1ee872578c GH-9636 plugins api GetUsersInChannelByStatus (#9645)
* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* GetUsersInChannelByStatus changed to more generic GetUsersInChannel which takes a sortBy parameter, allowing for more granular/extensible sorting functionality in the future

* GetUsersInChannel accepts sort parameter of 'username' and 'status'. Both values are consts in model pkg.

* Documents minimum server version for GetUsersInChannel.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* Resolved conflict on rebase

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* GetUsersInChannelByStatus changed to more generic GetUsersInChannel which takes a sortBy parameter, allowing for more granular/extensible sorting functionality in the future

* GetUsersInChannel accepts sort parameter of 'username' and 'status'. Both values are consts in model pkg.

* Documents minimum server version for GetUsersInChannel.

* replaces GetUsersInChannel from #9608 / #9643 with sortBy functionality
2018-10-22 08:49:50 -04:00
Hanzei
6c6638f05e GH-9688: Migrate to idiomatic error handling in app/post.go (#9697)
* Migrate to idiomatic error handling in app/post.go

* Revert import changes
2018-10-19 16:29:39 +01:00
Hanzei
2c849c7998 Migrate to idiomatic error handling in app/web_conn.go (#9709) 2018-10-19 13:31:20 +01:00
Artur Mogozov
c3993704ef MM-12372 Add modify-incoming webhook command (#9683)
* MM-12372 Add modify-incoming webhook command

* Review comments
2018-10-19 12:04:12 +01:00
S4KH
c3d536c644 GH-9619 GetEmojiImage added to plugin API (#9628)
* GH-9619 conflict fix

* GH-9619 fixed conflicts, version comment
2018-10-18 16:07:21 -04:00
Jesse Hallam
d1805733fe MM-12505: remove all things WebRTC (#9700) 2018-10-18 14:49:10 -03:00
Hanzei
a708c33520 Migrate to idiomatic error handling in app/preference.go (#9594) 2018-10-18 17:15:30 +01:00