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

11299 Коммитов

Автор SHA1 Сообщение Дата
Gabe Jackson
48e06e9bc4 Fix issue with setting mention count (#11610)
This change does the following:
 - Fixes a bug where mention counts could be set incorrectly for
   users in the database.
 - Updates the original notification unit test to check for more
   possible notification issues.
 - Adds a new unit test that performs mention count checking to
   prevent a regression to this fix.
2019-07-11 18:35:02 -04:00
Ali Farooq
5ed40a48c8 MM-16872 - Extend Plugin API to set LHS bot icon (#11601)
* MM-16872 - Extend Plugin API to set LHS bot icon

* MM-16872 - Using ReadSeeker as opposed to Reader for reading svg image file

* MM-16872 - PR feedback

* MM-16872 - Using userId rather than bot.UserId

* MM-16872 - Minor stylistic changes

* MM-16872 - Removing DriverName check
2019-07-11 12:00:12 -04:00
Rajiv Kushwaha
76f4fccf8a Migrate "Team.ClearAllCustomRoleAssignments" to Sync by default (#11587) 2019-07-11 14:54:56 +01:00
Allan Guwatudde
e8f77daa8a [MM-16562] Migrate User.GetUnreadCountForChannel to Sync by default (#11604)
* Migrate User.GetUnreadCountForChannel to Sync by default

* Remove else block from GetUnreadCountChannel in user_store.go

* Return nil value for count when an error occurs in GetUnreadCountForChannel

* Fix linting issue in user_store.go
2019-07-11 08:52:56 -04:00
Sven Hüster
5690df9d95 add support for new slack post format and multiple attachments in slack importer (#11415)
* add support for new slack post format and multiple attachments

* add test for multiple attachments in imported slack posts
2019-07-11 10:47:51 +01:00
Maria A Nunez
859c571558 MM-16261 - Store Plugin in File Store (#11511)
* Implemneted saving the plugin bundle on the file store upon plugin upload

* Fixed compilation error

* Fixed compilation issue

* Added deletion from file store upon plugin uninstall

* Added condition to delete from store only when exists. Added case of saving the bundle to the store when uploading from url. Added checks in plugin tests

* Fixed compilation error

* Moved storage of plugin bundle within app/installPlugin

* Moved storing to filestore before enabling the plugin

* Fixed error handling

* Code styling improvements

* Minor styling fix
2019-07-10 17:05:33 -03:00
Jesper Hansen
b464f31b38 Add progressive backoff function (#11497)
* [MM-15267] Utils: add backoff function to allow retries (#10958)

* [MM-15267] Utils: add unit test and update retry logic (#10958)

* [MM-15267] Utils: Add three retries to ProgressiveRetry (#10958)

* [MM-15267] Utils: add comments for progressive retry (#10958)

* [MM-15267] Utils: add license header to newly added file (#10958)

* [MM-15267] Utils: fix typo (#10958)

* [MM-15267] Utils: inline callback in function call (#10958)

* [MM-15267] Utils: remove type definition for backoff callback function (#10958)

* [MM-15267] Utils: use lookup table for timeout duration (#10958)

* [MM-15267] Utils: table driven unit tests for Progressive Backoff (#10958)

* [MM-15267] Utils: simplify retry function (#10958)

* [MM-15267] Utils: add assert and require packages to test file (#10958)

* [MM-15267] Utils: revert changes in go.mod and go.sum (#10958)
2019-07-10 15:59:18 -03:00
Micah Thompson
903085feb8 Migrate "User.UpdateMfaActive" to Sync by default (#11566) 2019-07-10 14:55:17 -04:00
Phillip Ahereza
e9b82bc1ce Migrate Plugin.DeleteAllForPlugin to Sync by default (#11597) 2019-07-10 14:54:38 -04:00
Claudio Costa
70fd0e0d6f Fix mixup between stdout and stderr in CLI (#11529) 2019-07-10 14:36:49 +02:00
Allan Guwatudde
15be0c6c79 [MM-16777] Migrate Team.MigrateTeamMembers to Sync by default (#11584)
* Migrate Team.MigrateTeamMembers to Sync by default

* Remove commented out MigrateTeamMembers function

* Remove return nil when no team members in query

* Return nil when no more team members in query

* Remove commented out code lines

* Format MigrateTeamMembers code

* Return some data from MigrateTeamMembers function

* Return data and error from MigrateTeamMembers

* Use result for consistency

* Control loop to allow loop to break in storetest/team_store.go

* Fix test MigrateTeamMembers test in storetest/team_store.go

* Change err to e in storetest/team_store.go
2019-07-10 12:39:24 +02:00
Taufiq Rahman
9ce5b28c63 [MM-16667] Migrate User.GetByUsername to Sync by default #11453 (#11520)
* Migrate User.GetByUsername to Sync by default #11453

* fix app errors #11453

* fix app errors #11453

* fix cmd error #11453

* fix shadow var #11453

* fix shadow user var #11453

* fix test error

* fix test error #11453
2019-07-10 10:46:03 +02:00
Rodrigo Villablanca Vásquez
678c8f4f84 Migrate CommandWebhook.TryUse to sync by default (#11593) 2019-07-09 22:57:05 +02:00
Mounica Paladugu
ff89b2c8e1 [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default (#11100)
* [MM-16170] Migrate Team.GetTeamsByUserId to Sync by default

* Fixing comments
2019-07-09 12:21:18 -04:00
Rodrigo Villablanca Vásquez
0ec609d159 Migrate CommandWebhook.Get to sync by default (#11594) 2019-07-09 11:54:25 -04:00
Rodrigo Villablanca Vásquez
0d5ef4a1ff Migrate User.GetProfilesNotInChannel to sync by default (#11514) 2019-07-09 17:27:37 +02:00
Mounica Paladugu
6fc0ec06b2 [MM-16168] Migrate Team.GetAllTeamListing to Sync by default (#11102)
* [MM-16168] Migrate Team.GetAllTeamListing to Sync by default

* reverting GetAllTeamPageListing modification

* Modifying app/team.go

* Simplifying code
2019-07-09 17:19:18 +02:00
Phillip Ahereza
eb0268f108 Migrate Plugin.DeleteAllExpired to Sync by default (#11583) 2019-07-09 17:15:35 +02:00
Rodrigo Villablanca Vásquez
25a2e7e981 Migrate CommandWebhook.Save to sync by default (#11595) 2019-07-09 09:42:10 -05:00
Rodrigo Villablanca Vásquez
ce61681c92 Migrate Plugin.SaveOrUpdate to sync by default (#11592) 2019-07-09 15:08:28 +02:00
Marc Argent
e209a7acb4 GH-11466 Migrate User.UpdatePassword to Sync by default (#11495)
* GH-11466 Migrate User.UpdatePassword to Sync by default

* GH-11466 format fix
2019-07-09 04:50:01 -07:00
George Goldberg
38aa14a5bf Migrate Team.RemoveAllMembersByTeam to Sync by default
commit 5cc7051ca2c5f0f665eda79b22a46b8ad0c17398
Author: phillipahereza <pahereza@gmail..com>
Date:   Sat Jul 6 15:01:18 2019 +0300
2019-07-09 11:46:59 +01:00
Allan Guwatudde
32616a989b [MM-16772] Migrate Team.RemoveMember to Sync by default (#11565)
* Migrate Team.RemoveMember to Sync by default

* Fixed typo in user_store.go

* Resolved merge conflicts in storetest/user_store.go
2019-07-08 15:40:02 -07:00
Tim Scheuermann
902521f7d3 MM-16783 Migrate "Team.UserBelongsToTeams" to Sync by default (#11589)
* Migrated UserBelongsToTeams to a syncronous method

* Updated the Store interface

* Updated calls and removed now obsolete wrapper

* Regenerated store mocks

* Reverted wrong method call
2019-07-08 23:03:23 +02:00
Keaton Neville
1640702d5e GH-11550 Migrate "Team.ResetAllTeamSchemes" to Sync by default (#11564)
* Refactor as per #11550

* Remove trailing semicolon
2019-07-08 18:01:39 -03:00
Mounica Paladugu
eddf48c848 [MM-16166] Migrate Team.GetAllPrivateTeamListing to Sync by default (#11103)
* [MM-16166] Migrate Team.GetAllPrivateTeamListing to Sync by default

* Simplifying code
2019-07-08 21:30:52 +02:00
Max Vovshin
bed9102eb1 Team.GetTeamsByScheme migrated to sync by default. (#11563) 2019-07-08 21:30:32 +02:00
Alexander Redinger
15c3c5f9e6 Migrate User.Save to Sync by default (#11482)
* Migrate User.Save to Sync by default

* Make error testing more explicit

* Factor out else

* Fix some merge-related bugs

* Add some missing nil err test requirements

* Improve function signature

* Remove unused time import

* More test fixups
2019-07-08 15:19:21 -04:00
Alejandro Sánchez Medina
d15c2c4e69 Migrate "Team.RemoveAllMembersByUser" to Sync by default (#11560)
* Migrate "Team.RemoveAllMembersByUser" to Sync by default

* fixing merge problem
2019-07-08 20:31:18 +02:00
Alejandro Sánchez Medina
2149e3dd2f [MM-16574] Migrate "User.GetEtagForProfilesNotInTeam" to Sync by default (#11518)
* [MM-16574] Migrate "User.GetEtagForProfilesNotInTeam" to Sync by default

* Update "GetEtagForProfilesNotInTeam" interface
2019-07-08 20:16:40 +02:00
Luke P
2e48b6ef3f [MM-16653] Migrate "User.UpdateUpdateAt" to Sync by default (#11517)
* Migrate "User.UpdateUpdateAt" to Sync by default

* Fixed errors in app/team.go that prevented successful build

* Reverted some changes in user_store test that caused errors in pipeline

* return of UpdateUpdateAt changed to model.AppError

* Ensured that UpdateUpdateAt in sqlstore/user_store.go returns int64 and *model.AppError, adjusted tests accordingly

* Generated mocks and ensured storetest/user_store.go had no errors

* Added require.Nil(t, err) to proper places in tests

* Added 'err' for second return value as opposed to _ in 4 UpdateUpdateAt() occurrences in storetest/user_store.go
2019-07-08 20:14:40 +02:00
Guillermo Vayá
797d1dc40f [MM-16784] Sync GetUserTeamIds (#11579)
* [MM-16784] Sync GetUserTeamIds

* fix format

* [MM-16784] put error in one line

* [MM-16784] Remove docstring as per CR request

* [MM-16784] Revert "Remove docstring as per CR request"

This reverts commit 8a64d3841b726d1806e2afb18ffd9802b51f3f21.
2019-07-08 20:10:25 +02:00
Taufiq Rahman
eb4c97c3e8 [MM-16315] Migrate Channel.PermanentDelete to Sync by default (#11485)
* [MM-16315] Migrate Channel.PermanentDelete to Sync by default

* fix migration at app/channel.go
2019-07-08 11:46:30 -05:00
Phillip Ahereza
ff5b221598 Migrate Plugin.List to Sync by default (#11582) 2019-07-08 23:35:33 +08:00
Harrison Healey
673ed02a0d MM-16543 Fix Elasticsearch only returning one page of results (#11528)
* MM-16543 Add mocking for einterfaces packages

* MM-16543 Fix Elasticsearch only returning one page of results

* Remove license checks for einterface mocks
2019-07-08 08:32:29 -07:00
Jesús Espino
c0b51b03de MM-16548: Fixing bug with empty type in the second line of the bulk import (#11567)
* MM-16548: Fixing bug with empty type in the second line of the bulk import

* Adding tests to this behavior

* Changing the approach to fix the problem
2019-07-08 16:17:06 +01:00
George Goldberg
efc342f294 MM-16625: Set UpdateAt correctly on deleting profile pic. (#11525) 2019-07-08 11:16:32 -04:00
Claudio Costa
1bd6d9a90b MM-10982 Support relative links in interactive message buttons (#11477)
* Add support for relative callback URLs to plugins

* Update relative URL check and make it more robust

* Add leading slash to input relative path
2019-07-08 08:50:55 -03:00
Phillip Ahereza
17b49e4538 [MM-16790] Migrate Plugin.Get to Sync by default (#11581)
* Migrate Plugin.Get to Sync by default

* remove unnecessary else branch

* remove unnecesary blank line
2019-07-08 13:13:10 +02:00
Jesús Espino
da6cb83f9b Allow to export global relay to zip (#11492)
* Allow to export global relay to zip

* Addressing review comments
2019-07-08 11:06:59 +02:00
Max Vovshin
956c8930f5 GetAllForExportAfter migrated to sync by default. (#11562) 2019-07-08 09:10:09 +01:00
George Goldberg
f08f7f77c3 MM-16759: Fix flaky group-store test. (#11527) 2019-07-08 07:55:46 +01:00
Rodrigo Villablanca Vásquez
e908165fe3 Migrate User.InferSystemInstallDate to sync by default (#11505)
* Migrate User.InferSystemInstallDate to sync by default

* Change var name
2019-07-08 07:46:31 +01:00
Alejandro Sánchez Medina
7663c5b00e Migrate "Team.UpdateLastTeamIconUpdate" to Sync by default (#11561) 2019-07-07 14:55:17 -05:00
Rodrigo Villablanca Vásquez
4380c0b7a8 Migrate User.ClearAllCustomRoleAssignments to sync by default (#11506) 2019-07-07 19:50:18 +02:00
Mounica Paladugu
89d8dd6816 [MM-15854] Migrate "Post.Search" to Sync by default (#11002)
* Migrate Post.Search to Sync by default

* app/post.go channels modification

* Removing tabs

* Removing tabs

* Reverting GetEtag modification

* Fixing channel corruption error

* Adding Done signal for goroutines

* remove fixed length wg

* undo wg short declaration

* Removing one comment

* Fixing change

* Fixing store mocks

* Fixing typo
2019-07-07 15:10:04 +02:00
Max Vovshin
0b90888e73 Team.GetTeamMembersForExport migration to Sync by default. (#11559) 2019-07-07 12:13:43 +02:00
Jesús Espino
96c33948da Migrate SchemeStore to sync by default (#11522)
* Migrate SchemeStore to sync by default

* Fixing tests compilation

* Fixing shadow variable

* Fixing tests
2019-07-06 09:07:54 +02:00
Rodrigo Villablanca Vásquez
7da08e7a0f Migrate User.UpdateFailedPasswordAttempts to sync by default (#11507)
* Migrate User.UpdateFailedPasswordAttempts to sync by default

* Removed unused return value
2019-07-06 09:05:44 +02:00
Ali Farooq
2ecca12bed MM-15452 - Add ability to override LHS icon for bot accounts (#11423)
* MM-15452 - Add ability to override LHS icon for bot accounts

* MM-15452 - Added translations

* MM-15452 - Updated GetIconImage test to check returned image

* MM-15452 - Added Delete handler for /icon endpoint, invalidating user cache on set/delete

* MM-15452 - Moved /icon routes under bot/, addressed other pr feedback

* MM-15452 - More conflict resolutoin

* MM-15452 Restoring api4/user.go

* MM-15452 - Using require as opposed to t for test assertions

* MM-15452 - Updated as per PR feedback
2019-07-06 08:56:21 +02:00