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

Feature Request: Ability to use @Here, etc. Alerting in Discord Notifications #889

Open
dyecast568 opened this issue Jun 19, 2023 · 5 comments
Labels
packages/notifications Issues related to notification package or its dependencies.

Comments

@dyecast568
Copy link

dyecast568 commented Jun 19, 2023

  • Problem : I'd like to submit this as a Feature Request. We are getting SeAT notifications in Discord, but urgent notifications (station attacked, fuel, etc.) are very easy to miss given that the notifications only highlight the channel as containing unread messages. I'd like to be able to use the @here, @ALL or even @'specific-person' for certain notifications.

  • Version Info:

Docker SeAT v.4.x

SeAT API Installed: v4.9.0
SeAT Console Installed: v4.8.0
SeAT Eve API Installed: v4.20.4
SeAT Notifications Installed: v4.3.3
SeAT Services Installed: v4.3.0
SeAT Web Installed: v4.20.0

@warlof warlof added the packages/notifications Issues related to notification package or its dependencies. label Jun 20, 2023
@recursivetree
Copy link

I'm in favor of implementing this, it seems like a nice addition. seat-alliance-industry can already do it: https://github.com/recursivetree/seat-alliance-industry/blob/master/src/Notifications/OrderNotificationSlack.php#L29-L41

The most difficult question is how to implement it: We don't have one place to inject it, instead we'd have to modify every slack notification. Of course we could also finally improve how notifications work, but I think it's too late for seat 5, and it would contain a lot of breaking changes.

@tehraven
Copy link

I'm in favor of implementing this, it seems like a nice addition. seat-alliance-industry can already do it: https://github.com/recursivetree/seat-alliance-industry/blob/master/src/Notifications/OrderNotificationSlack.php#L29-L41

The most difficult question is how to implement it: We don't have one place to inject it, instead we'd have to modify every slack notification. Of course we could also finally improve how notifications work, but I think it's too late for seat 5, and it would contain a lot of breaking changes.

Could we implement a boolean at the AbstractNotification level and a checkbox (default false) on the UI so that people creating Notification groups could opt into their webhook pushes being prefixed with @here or something?

@recursivetree
Copy link

Yes, that's probably the best approach, but the thing is, AbstractNotification doesn't have any hook to inject the ping into the SlackMessage. This means we'd have to modify every single notification, since the SlackMessage is only accessible in the toSlack method of the actual notification implementation. For the core, this isn't a huge issue, it's just some boring work. What I worry about is plugins: They need to be changed too.

@recursivetree
Copy link

recursivetree commented Jun 23, 2023

Maybe what we could do is to implement a toSlack()method in seat 5's AbstractSlackNotification and require an abstract populateMessage method that the individual messages implement. That way, toSlack() in AbstractSlackNotification could create the SlackMessage, add pings and pass it to populateMessage. That's probably the cleanest design, but it breaks compatibility, meaning we'd have to get it in seat 5. @warlof Is that still an option, or how close are we to release?

I'd implement it if it's wanted.

@recursivetree
Copy link

I decided to go the route of updating eveseat/notifications#60 to seat 5 and then implementing notifications on top of it: eveseat/notifications#81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/notifications Issues related to notification package or its dependencies.
Projects
None yet
Development

No branches or pull requests

4 participants