Commit Graph

351 Commits

Author SHA1 Message Date
Giorgos Christos Dimitriou
2e79ae9636 Change the implementation of GetAll() in preference_store.go to ret… (#10926)
* Change the implementation of GetAll() in `preference_store.go` to return an
object from `model` and a *model.AppError.
Change the Interface in `store.go` to accomodate for the change
Change the test that called the GetAll() function

* Rename the result variable to preferences so it makes more sense.
Use assertions to keep the test consistent

* Generate the correct mocks after the code changes

* Remove redundant conditions

* Address govet errors

* Resolve conflicts with master's new changes

* Fix Save() function according to the new changes in master (Got
overwritten with the previous commit)

* Change the assertions to have the same format as commit 2d97f01
2019-06-03 07:25:04 -04:00
Woolim Cho
d1f81842a5 [MM-15799] Migrate "Session.PermanentDeleteSessionsByUser" to Sync by default (#11038) 2019-06-03 13:22:02 +02:00
Rodrigo Villablanca Vásquez
e20d91b00e Fix #10975. GetEtag is sync now (#11011)
* Fix #10975. GetEtag is sync now

* Revert of modifications to go.mod and go.sum
2019-05-31 17:58:24 -04:00
Jesús Espino
9e17274741 Migrate Store groups to sync by default (GroupSyncable methods) (#11003) 2019-05-31 18:27:56 +02:00
GianOrtiz
ec20d3a844 MM-15794 Migrate "Session.Get" to Sync by default (#10990) 2019-05-30 23:22:19 +02:00
Rodrigo Villablanca Vásquez
9fa1622fc3 Fix #10963: GetDirectPostParentsForExportAfter is sync now (#11009) 2019-05-30 23:19:14 +02:00
Jesús Espino
76e00b406e Migrate Groups store to sync by default (GetGroups and Counts) (#10998) 2019-05-30 20:39:43 +02:00
Jesús Espino
b3118ce605 Migrate Groups store to sync by default (Add/Remove Channel/Team Members) (#10997)
* Migrate Groups store to sync by default (Add/Remove Channel/Team Members)

* Addressing PR review comments
2019-05-30 20:38:22 +02:00
Evan do Carmo
ae6fed827a #10939 Migrate "Session.Save" to Sync by default (#10944)
* Migrate "Session.Save" to Sync by default

* fixing unreachable code

* removing shadowing

*  whitespace changes, refactoring flow control logic

* removing unnecessary whitespace
2019-05-30 12:10:24 -04:00
Evan do Carmo
cee1e36859 MM-15846 migrating get posts to sync by default (#10994)
* migrating get posts to sync by default

* flow control and style changes

* style changes, error checking

* pulling master down

* counting missed cache, not hit

* fixing bad conflict resolution

* forcing rebuild
2019-05-30 10:44:33 -04:00
Evan do Carmo
427effcd5c MM-15843 migrating post.GetSingle() to sync by default (#10992) 2019-05-30 14:43:45 +02:00
Evan do Carmo
8ff58a07bd MM-15842 making post.update() sync by default (#10991)
* making post.update() sync by default

* fixing style issues

* style changes

* fixing variable name
2019-05-30 10:35:46 +02:00
Jesper Hansen
58363d3455 [MM-15194] Store: Migrate Emoji.Save to Sync as default #10642 (#10955)
* Store: Migrate Emoji.Save to Sync as default #10642

* Store: use require.Nil helper function to assert nil
2019-05-29 14:32:54 -04:00
Evan do Carmo
9f4c703f1e MM-15847 migrating getFlaggedPosts to sync by default (#10995) 2019-05-29 18:05:59 +02:00
Evan do Carmo
28d668cd91 MM-15848 migrating getFlaggedPostsForTeam to sync by default (#10996) 2019-05-29 16:48:05 +02:00
Ishank Gulati
3b25e09b99 [GH-10866] Preferrence.Save - Remove preference length return arg (#10962) 2019-05-29 09:54:56 -04:00
Evan do Carmo
42ac975c0e migrating perm delete by channel to sync (#10993) 2019-05-29 14:55:03 +02:00
Bolarinwa Balogun
78b525df89 [MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default (#10945)
* [MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default

* Remove else clause from 'IsFeatureEnabled'
2019-05-28 15:04:24 +01:00
Bolarinwa Balogun
bdcee4d979 MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default (#10954)
* MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default

* Change API Call to use Sync approach
2019-05-28 15:55:04 +02:00
Woolim Cho
d9969613f7 Migrate Preference.DeleteCategory to Sync by default (#10927) 2019-05-28 04:02:38 -07:00
Jesús Espino
fb237cc624 Migrate User.Update method to sync by default (#10942) 2019-05-28 09:40:29 +02:00
Bolarinwa Balogun
674b6f2285 [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default (#10948)
* [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default

* Use Explict Async for sessionChan in analytics.go
2019-05-27 18:54:46 +02:00
Andres Orozco
ff0d3ab00b MM-15354: Migrate Channel.Save to sync by default (#10871)
* MM-15354: Migrate Channel.Save() to sync by default

* MM-15354: fix unchanged Channel().Save() methods

* fix typo

* fix nil reference bug and update tests for channels

* fix err shadowing bug

* MM-15354 fix support for sync version of Save
2019-05-27 17:54:04 +02:00
Woolim Cho
d28f56c61e Migrate Preference.DeleteCategoryAndName to Sync by default (#10940) 2019-05-27 11:40:49 -04:00
Ishank Gulati
fb6c1debf0 [MM-15296] Migrate "Preference.Save" to Sync by default (#10866)
* response format changes

* Generated mocks
Fixed all references of Preferences.Save

* Remove old code from store.go (incorrect merge)

* Review change - Add validations on count and error

* Review change - return from root level

* Review change - return 0 as nil value for int

* fix initialisation of err in preference_store
2019-05-26 15:06:33 +02:00
Martin Kraft
e8af4872c6 MM-15422: Adds new parameters for retrieving pages of channels. (#10903)
* MM-15422: Adds new parameters for retrieving pages of channels and searching channels.

* MM-15422: Appends excluded channel names with defaults. Adds separate struct for data-tier option parameter.
2019-05-24 11:28:42 -04:00
Jesús Espino
1269db8691 Migrate User.PermanentDelete to Sync by default (#10876) 2019-05-24 15:16:15 +02:00
farhadab
6158adb5b4 [MM-15305] Migrate Preference.CleanupFlagsBatch to Sync by default (#10858)
* [MM-15305] Migrate Preference.CleanupFlagsBatch to Sync by default

* clean up code in CleanupFlagsBatch
2019-05-24 09:46:07 +02:00
PR
0b6acaa9ba GH-10761: Migrate Post.Get to sync by default (#10831)
* GH-10761: Migrate Post.Get to sync by default

* instantiate storeChannel with make

* fix go vet issue

* fix go vet issue

* use select for checking channel for value

* fix go vet shadow variable issue

* addressing review comments

* call post.Get() in goroutine

* refactor minor values to fix tests

* fix: remove err error type, it should be *model.AppErr
2019-05-21 11:01:30 -07:00
Jesús Espino
f8a89a52fc Migrate System store to Sync by default (#10838) 2019-05-21 18:22:27 +02:00
Devin Binnie
9652b49569 [MM-15300] Migrate "Preference.PermanentDeleteByUser" to Sync by default (#10860)
* [MM-15300] Migrate "Preference.PermanentDeleteByUser" to Sync by default

* [MM-15300] Fixed readability on the SQL statement
2019-05-20 13:46:41 +02:00
Jesús Espino
6d1ac00330 Migrate Roles Layered store to Sync by default (#10790)
* Migrate Roles Layered store to Sync by default

* Fixing govet

* Addressing PR review comments
2019-05-17 12:03:04 -03:00
PR
6d2fa0f3d2 Migrate Overwrite and GetMaxPostSize() in PostStore to sync by default (#10829)
* Migrate Overwrite and GetMaxPostSize() in PostStore to sync by default

* GH-10762: fix return type for mock func

* GH-10762: fix tests for MaxPostSize() mocks

* fix imports
2019-05-17 10:46:18 +02:00
Shota Gvinepadze
fab2e349b3 [MM-10768] Migrate "Channel.SaveDirectChannel" to Sync by default (#10846) 2019-05-16 22:04:58 +02:00
Pradeep Murugesan
5d1ee9373f made the Restore and Delete store method to be sync (#10835) 2019-05-16 12:31:50 +02:00
Miguel de la Cruz
098dbc84cc [MM-14751] Adds group_constrained filter to user list and search endpoints (#10678) 2019-05-16 10:12:06 +01:00
Jesús Espino
beb7592c93 Migrate FileInfo store to Sync by default (#10837) 2019-05-15 22:07:03 +02:00
Martin Kraft
1b78f9debc MM-14897: Changes to be able to add and remove groups from channels. (#10794)
* MM-15162: Changes for LDAP groups removals phase.

* MM-14897: Changes to be able to add and remove groups from channels.

* Update model/client4.go

* MM-14897: PR-requested change to string interpolation.
2019-05-15 12:03:47 -04:00
Pradeep Murugesan
24a02b4168 made the preference store GetCategory method sync (#10847)
* made the preference store GetCategory method sync

* fixed the review comments
2019-05-15 07:56:42 -07:00
Ivana Irene Thomas
a68ad55151 [MM-15297] Migrate "Preference.Get" to Sync by default #10721 (#10811)
* modify Get method in preference_store

* modify interface to match changes on preference store Get method

* modify variable initialization

* fix behavior on GetPreferenceByCategoryAndNameForUser
2019-05-15 13:20:26 +01:00
Shota Gvinepadze
b561d7900c [MM-15356] Migrate "Channel.Update" to Sync by default (#10815) 2019-05-14 23:02:04 +02:00
Elias Nahum
5b252e8736 Tracking Push Notifications in a structured logger (notifications.log) (#10823)
* Remove NotificationRegistry table and use structured logging

* Fix ackId for notification sent

* Notification logger at server level

* Remove unused i18n strings
2019-05-13 07:53:46 -07:00
PR
b3aa3d4567 GH-10760: Migrate Post.Delete to sync by default (#10830) 2019-05-13 13:07:15 +02:00
Martin Kraft
480fffd3cc MM-15162: Changes for LDAP groups removals. (#10701)
* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Adds missing translation blocking enterprise build.

* MM-15162: Update to group commands.
2019-05-10 11:47:21 -04:00
Shobhit Gupta
53d0bfe35e [MM-15193] Migrate "Emoji.Get" to Sync by default (#10801)
* Change emoji.Get to sync

* Make emojistore.get sync

* Update mocks

* Fix build
2019-05-10 10:57:08 -04:00
Puneeth Reddy
6ce3cc6921 MM-15290: Migrate commandStore.GetByTrigger to sync by default (#10741)
* MM-15290: migrate command.GetByTrigger to sync by default

* Fix build

* MM-15290: fix go vet issue
2019-05-07 20:44:30 +02:00
Shobhit Gupta
9ab3cc9051 Change Channel.GetChannelUnread to sync (#10804)
* Change Channel.GetChannelUnread to sync

* Address comments
2019-05-07 18:15:12 +02:00
Puneeth Reddy
4f7f7070c0 MM 15185 - Migrate "WebHook.GetOutgoingByChannel" to Sync by default (#10704) 2019-05-07 13:50:03 +02:00
Puneeth Reddy
2d3fb4f426 MM-15288: Migrate CommandStore.Get to sync by default (#10739)
* MM-15288: Migrate Command.Get to sync by default

* addressing review comments, updating status code of err returned by Get Method
2019-05-06 18:12:41 +02:00
Puneeth Reddy
b462941f48 [MM-15192] Migrate "WebHook.AnalyticsOutgoingCount" to Sync by default (#10711) 2019-05-01 16:37:29 +02:00