Uh oh!
There was an error while loading. Please reload this page.
Make ContactsStore a public API - #6637
Conversation
mention-bot
commented
Sep 25, 2017
@LEDfan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @icewind1991 and @rullzer to be potential reviewers. |
| if (!is_null($user)) { | ||
| $app->setupContactsProvider($cm, $user->getUID()); | ||
| } else { | ||
| $app->setupSystemContactsProvider($cm); |
There was a problem hiding this comment.
This change is needed when there is no users, e.g on the CLI using the occ command.
ChristophWurst
left a comment
There was a problem hiding this comment.
Looks good so far, just some minor documentation/code style issues
| use OCP\IUser; | ||
| interface IContactsStore { |
There was a problem hiding this comment.
missing @since annotations on both the interface and its methods
| */ | ||
| public function findOne(IUser $user, $shareType, $shareWith); | ||
| } No newline at end of file |
Codecov Report
@@ Coverage Diff @@## master #6637 +/- ##
============================================
- Coverage 51.09% 51.09% -0.01% - Complexity 24865 24867 +2
============================================
Files 1596 1596 Lines 94608 94622 +14 Branches 1367 1367 ============================================
+ Hits 48340 48344 +4 - Misses 46268 46278 +10
|
LEDfan
commented
Oct 1, 2017
@ChristophWurst done |
LEDfan
commented
Dec 3, 2017
This is still tagged for NC 13, does this mean it will be merged before 13? I forgot about the featue-freeze to bump this in time... |
MorrisJobke
commented
Dec 8, 2017
We plan to do the beta2 soon (at least middle of next week, looking at the other open PRs). I would like to have feedback from @rullzer or @ChristophWurst on this one here. |
MorrisJobke
commented
Dec 8, 2017
And please fix the conflicts ;) |
8dbc639 to
3b2e916CompareLEDfan
commented
Dec 9, 2017
@MorrisJobke I fixed the conflicts. |
MorrisJobke
commented
Dec 10, 2017
@LEDfan Because you added a new PHP class could you dump the autoloader again: |
| ); | ||
| }); | ||
| $this->registerService(\OCP\Contacts\ContactsMenu\IContactsStore::class, function(Server $c) { |
There was a problem hiding this comment.
Register it as alias with $this->registerAlias(\OCP\Contacts\ContactsMenu\IContactsStore::class, \OC\Contacts\ContactsMenu\ContactsStore); and the DI container will resolve the constructor args automatically. This also prevents the contacts store being instantiated twice.
LEDfan
commented
Dec 10, 2017
@MorrisJobke@ChristophWurst thanks, I updated the PR 😄 |
blizzz
commented
Dec 11, 2017
more conflicts @LEDfan |
9bb7f5b to
adf7d11CompareMorrisJobke
commented
Dec 11, 2017
Fixed the conflicts in the server container. Nothing crucial. |
MorrisJobke
commented
Dec 11, 2017
Ah ... and conflicts again in the same file ... let me rebase a last time 🙈 |
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
adf7d11 to
cecfc28Compare
This makes the ContactsStore a public API which can be used by apps. As I described here: #5585 (comment) this is needed for e.g. the Chat app to know which users are allowed to Chat with other users.