-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish notification when adding user #28
Conversation
|
|
Ready for review @jvillafanez @DeepDiver1975 @IljaN @VicDeo I'll investigate how to kill the notification in case of deletion separately, seems to be tricky. |
@@ -21,3 +21,4 @@ | |||
|
|||
$app = new \OCA\CustomGroups\Application(); | |||
$app->registerGroupBackend(); | |||
$app->registerNotifier(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cries for info.xml enhancement ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we had a generic service registration we wouldn't need to enhance core for everything out there
<services><service type="\OC\INotifier">\OCA\CustomGroups\Notifier</service></services>
then core (or any app) could just find all services of a given type/namespace.
That was what I hoped to achieve with https://central.owncloud.org/t/service-based-app-imlpementation-to-solve-inter-app-dependencies/1615
@@ -78,7 +79,9 @@ public function setUp() { | |||
$this->handler, | |||
$this->userSession, | |||
$this->userManager, | |||
$this->groupManager | |||
$this->groupManager, | |||
$this->createMock(\OCP\Notification\IManager::class), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could... but I somehow hate having IManager
without knowing what a "manager" is.
This should have been called INotificationManager
in the first place.
Or I could use use xxx as yyy
?
*/ | ||
private $handler; | ||
|
||
public function setUp() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent:setup?
$this->handler = $this->createMock(CustomGroupsDatabaseHandler::class); | ||
|
||
$this->notifier = new Notifier( | ||
\OC::$server->getL10NFactory(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to mock it... too many calls to it and in the end the default one works fine as it will return the same texts untranslated but formatted
@DeepDiver1975 fixed the namespace use and added Other pieces aren't blockers from my POV. |
Fixes #4