Skip to content
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

Thresholds: NC Notification and color coding #5

Closed
Rello opened this issue Nov 26, 2019 · 8 comments
Closed

Thresholds: NC Notification and color coding #5

Rello opened this issue Nov 26, 2019 · 8 comments
Assignees
Milestone

Comments

@Rello
Copy link
Owner

Rello commented Nov 26, 2019

No description provided.

Rello added a commit that referenced this issue Nov 26, 2019
@Rello Rello mentioned this issue Nov 26, 2019
31 tasks
@Rello
Copy link
Owner Author

Rello commented Nov 27, 2019

Screenshot 2019-11-27 at 21 25 29

@Rello Rello closed this as completed Nov 27, 2019
@Rello
Copy link
Owner Author

Rello commented Nov 27, 2019

Hello @nickvergessen

I implemented notifications but I am receiving an error in NC16 - I assume its due to NC17.
Is there a complatibility to work with both or do I need to limit to NC17 now?

Call to undefined method OC\\Notification\\Manager::registerNotifierService()

its in Application.php
\OC::$server->getNotificationManager()->registerNotifierService(Notifier::class);

Rello added a commit that referenced this issue Nov 27, 2019
@nickvergessen
Copy link

No, it's not possible to be compatible with 16 and 17 at the same time

@nickvergessen
Copy link

You would need to have a second Notifier (call it Notifier16) and register with registerNotifier on the notification manager when that method is available. Or you tell your users that there is cool notifications when they update to 17 and you simply dont register on 16.

@Rello
Copy link
Owner Author

Rello commented Nov 27, 2019

ok, but how do "not register" with NC16? I would go that route. currently NC17 dependency brakes in total.

and: could you do me a favour and check my implementation to avoid any obvious mistakes? would really be a help
https://github.com/Rello/analytics/blob/c5a2d1db4487d3f9e589e8ddef0632bcf90e5b42/lib/Notification/NotificationManager.php

https://github.com/Rello/analytics/blob/c5a2d1db4487d3f9e589e8ddef0632bcf90e5b42/lib/Notification/Notifier.php

@Rello Rello reopened this Nov 27, 2019
@nickvergessen
Copy link

\OC::$server->getNotificationManager()->registerNotifierService(Notifier::class);

Replace with:

$notificationManager = \OC::$server->getNotificationManager();
if (method_exists($notificationManager, 'registerNotifierService')) {
    \OC::$server->getNotificationManager()->registerNotifierService(Notifier::class);
}

And do the same where you "create" the notification

Rello added a commit that referenced this issue Nov 28, 2019
@Rello Rello self-assigned this Nov 28, 2019
Rello added a commit that referenced this issue Dec 13, 2019
Rello added a commit that referenced this issue Dec 13, 2019
@Rello Rello changed the title NC Notification for threshold alerts Thresholds: NC Notification and color coding Dec 13, 2019
@Rello Rello added the testing development finished; in testing label Dec 13, 2019
@Rello Rello added this to the 1.2.0 milestone Dec 13, 2019
Rello added a commit that referenced this issue Dec 14, 2019
Rello added a commit that referenced this issue Dec 14, 2019
@Rello
Copy link
Owner Author

Rello commented Dec 14, 2019

Screenshot 2019-12-14 at 21 41 23

https://www.youtube.com/watch?v=qnNZafE7ECM

@nickvergessen thank you for your help. next milestone reached!

@Rello Rello added pending release part of the next release version and removed testing development finished; in testing labels Dec 14, 2019
@Rello
Copy link
Owner Author

Rello commented Dec 14, 2019

Information: Notifications only working as of NC17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants