Commit Graph

75 Commits

Author SHA1 Message Date
Joram Wilander
4a1802c039 MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches

* Increment session invalidation metric

* Fix tests
2018-03-05 10:35:26 -05:00
Christian Hoff
2b3b6051d2 PLT-7567: Integration of Team Icons (#8284)
* PLT-7567: Integration of Team Icons

* PLT-7567: Read replica workaround, upgrade logic moved, more concrete i18n key

* PLT-7567: Read replica workaround, corrections

* PLT-7567: upgrade correction
2018-03-01 19:11:44 +00:00
George Goldberg
d2b70b8671 Simplification of a Channel Members query. (#8345) 2018-02-28 23:07:09 +00:00
Saturnino Abril
45d7c51d9f merge 4.7.1 to master 2018-02-19 23:47:34 +08:00
JoramWilander
291432e254 Add upgrade code from 4.7.0 to 4.7.1 2018-02-16 17:14:22 -05:00
Jesús Espino
2930766c65 PLT-8723: Fix DeadLock on reactions insertions (#8225)
* PLT-8723: Fix DeadLock on reactions insertions

* Improved the HasReactions update SQL
2018-02-15 16:41:49 -08:00
Jonathan
bf1fdf92c7 XYZ-110: Cherrypicking changes from release-4.7 to master (#8254)
* Cherry-picking 7b2861de3a to master because enterprise/master has code in it that enterprise/release-4.7 does not, and I don't want enterprise/master to break the next time somebody merges enterprise/release-4.7 to enterprise/master

* Renamed file to match existing scheme

(cherry picked from commit 8c22c5c6c6)
2018-02-13 15:17:29 -05:00
Jonathan Fritz
18fa32567b Merge branch 'release-4.7' into XYZ-110 2018-02-13 08:39:56 -05:00
Jonathan Fritz
7b2861de3a Removed unused fields from ChannelMemberHistory table, introduced new model.ChannelMemberHistoryResult object that includes those fields that are selected from a join on other tables 2018-02-12 16:14:52 -05:00
Derrick Anderson
c209e44574 revert master changes 2018-02-12 16:01:02 -05:00
Joram Wilander
3e0c3eff9f ABC-228 Update GetPosts caching to work for non-60 limits (#8233)
* Update GetPosts caching to work for non-60 limits

* Only cache on limits of 30/60 and add test

* Add comments clarifying 30 and 60 limits
2018-02-09 14:47:22 -08:00
Derrick Anderson
e7b084842a Merge branch 'release-4.7' 2018-02-09 12:59:56 -05:00
Derrick Anderson
1b064c674a Add prepatory code for 4.8.0 (#8226)
* Add prepatory code for 4.8.0

* formatting issue

* build bug
2018-02-08 12:12:48 -05:00
JoramWilander
840892ab88 Increase OAuth2 state parameter limit 2018-02-07 16:21:22 -05:00
Jonathan
d3e934d07a XYZ-35: Added Support for GlobalRelay Compliance Export Format
* Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export
* Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo
* Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests
* Moving templates in from enterprise to solve test issues
* Added export format to diagnostics
* Changed email attachment code to use FileBackend so that S3 storage is properly supported
2018-02-07 09:02:46 -05:00
Joram Wilander
323d717a40 Uncomment upgrade code for 4.7 (#8201) 2018-02-05 18:11:31 -05:00
Chris
c89cf572f7 make channel autocomplete sort case-insensitive (#8176) 2018-01-31 14:57:08 -05:00
Chris
e0ee73ef99 ABC-79: Optimize channel autocomplete query (#8163)
* optimize channel autocomplete query

* move to new autocomplete endpoint
2018-01-31 09:26:40 -05:00
Martin Kraft
540dd9ae94 XYZ-32: Increases size of position to 128 characters. (#8148)
* XYZ-32: Changes type of 'position' column on 'users' table.

* XYZ-32: Uncomment to run on CI and pre-release.

* XYZ-32: Reverts translation changes.

* XYZ-32: Fix for gofmt.
2018-01-26 08:37:12 -05:00
Joram Wilander
3918ed6c58 Add GET /emojis/name/{emoji_name} API endpoint (#8142) 2018-01-24 08:50:11 -05:00
Joram Wilander
4f4a765e7d ABC-90 Add POST /emoji/search and GET /emoji/autocomplete API endpoints (#8125)
* Add POST /emoji/search and GET /emoji/autocomplete API endpoints

* Add constant to be clearer
2018-01-23 08:04:44 -08:00
Joram Wilander
a844577535 Add sort query parameter to GET /emojis (#8121) 2018-01-19 09:37:59 -05:00
Joram Wilander
dce0616305 ABC-73 Move session clean-up to daily task (#8095)
* Move session clean-up to daily task

* Split delete query into batches
2018-01-17 08:50:49 -05:00
Adrian Carolli
b1d13a2d89 [PLT-7793] Add /users/tokens/search endpoint (#8088)
* Add /users/tokens/search endpoint + tests

* Fix check-style

* Unnecessary deletion
2018-01-11 16:30:55 -05:00
Adrian Carolli
fd3fa8f8dc [PLT-7793] Added /users/tokens endpoint (#8038)
* Added /users/tokens/all endpoint

- UserAccessStore now has getAll method
- Added tests
- Added route
- Added handler

* Remove space fix check-style

* Remove blank space check-style

* Fixes for make check-style

* Remove extra code that is un-needed in user_test.go

* Rename endpoint + grammar

- Renamed /users/tokens/all to /users/tokens
- Renamed getUserAccessTokens to getUserAccessTokensForUser
- Renamed getAllUserAccessTokens to getUserAccessTokens
- Minor Grammar changes

* Add localization for sql_user_access_token.get_all

* Fix minor plural spelling
2018-01-05 14:46:48 -05:00
Derrick Anderson
edc4c35f5f Uncomment upgrade for 4.6 (#8045)
* Uncomment upgrade for 4.6

* add 4.6 version
2018-01-05 12:29:40 -05:00
George Goldberg
143e664cd9 PLT-8312: Use combined LIKE/Full Text search for channels. (#8029)
* PLT-8312: Use combined LIKE/Full Text search for channels.

* Code tidyup

* Get it working consistently and update unit tests.

* Fix code style.
2018-01-05 23:59:10 +08:00
Jesús Espino
a5bbf3f643 PLT-8483: Ignore join/leave team messages for unread counts (#8042) 2018-01-05 09:27:42 -05:00
Jesse Hallam
e5dad3cf68 [PLT-8173] Strip the post_ prefix on incoming webhook overrides. (#8019) 2018-01-03 10:35:36 -05:00
Jesse Hallam
e9fe9f50dd [PLT-8173] Add username and profile picture to webhook set up pages (#8002) 2018-01-02 08:41:23 -08:00
George Goldberg
dcc2016755 PLT-8354: Fix user search error when terms end up as empty space. (#7984) 2017-12-20 19:29:43 +00:00
Chris
4127474b47 fix posts created at test (#7977) 2017-12-14 05:37:51 -06:00
Jonathan
ab30c4daf9 PLT-8297: Message Export Should Still Produce Valid Exports if ChannelMemberHistory Data is Missing (#7951)
* Added a less accurate ChannelMembers fallback that is used if export period occurs before MessageExport was enabled

* Fixed test names

* Improved testing

* Made hasDataFromBefore() a little less strict

* Fixed the test to cleanly truncate the ChannelMemberHistory table without exposing the db via the interface

* Renamed a function for better clarity

* Binary logic is hard
2017-12-12 09:42:29 -05:00
Christopher Speller
fa9aa85705 Fixing formating on SQL errors for get parent posts. (#7965) 2017-12-12 08:15:32 -05:00
Christopher Speller
ae931ae6b6 Add upgrade code for 4.6 2017-12-08 11:12:09 -08:00
Christopher Speller
39cf3a998d Uncomment upgrae for 4.5 2017-12-08 11:04:23 -08:00
Joram Wilander
7cefef6d21 Hash key for plugin store and limit id length (#7933) 2017-12-05 15:19:33 -08:00
Jonathan
c171872472 PLT-8233: Purge ChannelMemberHistory Data when Data Retention Job runs (#7937)
* Changed the channel member history purge function to match pattern established by other data retention purge methods

* Simplifying the channel member history store and associated tests

* Regenerating mocks

* Using a constant
2017-12-05 16:32:23 -05:00
Christopher Speller
81c1fad4d4 Revert "Hash key for plugin store table and limit plugin ID length (#7915)" (#7931)
This reverts commit c3af878573.
2017-12-01 23:20:11 -08:00
Joram Wilander
c3af878573 Hash key for plugin store table and limit plugin ID length (#7915)
* Hash plugin store keys and update column limits

* Limit plugin ID length on install

* Add note to manifest id and allow zero length keys
2017-12-01 15:20:08 -05:00
Jonathan
375c0632fa PLT-7503: Create Message Export Scheduled Task and CLI Command (#7612)
* Created message export scheduled task

* Added CLI command to immediately kick off an export job

* Added email addresses for users joining and leaving the channel to the export

* Added support for both MySQL and PostgreSQL

* Fixing gofmt error

* Added a new ChannelMemberHistory store and associated tests

* Updating the ChannelMemberHistory channel as users create/join/leave channels

* Added user email to the message export object so it can be included in the actiance export xml

* Don't fail to log a leave event if a corresponding join event wasn't logged

* Adding copyright notices

* Adding message export settings to daily diagnostics report

* Added System Console integration for message export

* Cleaned up TODOs

* Made batch size configurable

* Added export from timestamp to CLI command

* Made ChannelMemberHistory table updates best effort

* Added a context-based timeout option to the message export CLI

* Minor PR updates/improvements

* Removed unnecessary fields from MessageExport object to reduce query overhead

* Removed JSON functions from the message export query in an effort to optimize performance

* Changed the way that channel member history queries and purges work to better account for edge cases

* Fixing a test I missed with the last refactor

* Added file copy functionality to file backend, improved config validation, added default config values

* Fixed file copy tests

* More concise use of the testing libraries

* Fixed context leak error

* Changed default export path to correctly place an 'export' directory under the 'data' directory

* Can't delete records from a read replica

* Fixed copy file tests

* Start job workers when license is applied, if configured to do so

* Suggestions from the PR

* Moar unit tests

* Fixed test imports
2017-11-30 09:07:04 -05:00
Chris
b87fae646a PLT-5458: If someone posts a channel link to channel_A that you don't belong to, it doesn't render properly (#7833)
* add channel link hints to post props

* optimization

* update regex, add unit test

* fix rebase issue
2017-11-28 13:02:56 -08:00
Joram Wilander
785a410936 Decrease plugin key value store table index name size (#7910) 2017-11-27 18:49:28 -05:00
Joram Wilander
6176bcff69 PLT-8131 (part2) Add plugin key value store support (#7902)
* Add plugin key value store support

* Add localization strings

* Updates per feedback
2017-11-27 17:23:35 -05:00
Chris
816a30397d Role refactor (#7867)
* role refactor

* add missing file

* fix web test
2017-11-21 11:08:32 -08:00
Christopher Speller
756caaa1fb Adding 4.5 upgrade code (#7815) 2017-11-11 00:23:19 -08:00
Christopher Speller
fef70d6c9e Uncomment upgrae for 4.4 (#7796) 2017-11-06 16:02:19 -08:00
Harrison Healey
6886de04d4 PLT-6071/PLT-8004 Fixed not being able to autocomplete 'Town Square' (#7746) 2017-10-31 15:52:10 +00:00
Chris
ce2b2be5de Refactoring cfg refs and load / save functions (#7749)
* refactoring cfg refs and load / save functions

* improve error output
2017-10-31 10:39:31 -04:00
Joram Wilander
443a880fbd Add command validation on update (#7742) 2017-10-30 12:14:17 -05:00