Ctrlpanel-gg / panel

CtrlPanel offers an easy-to-use and free billing solution for all starting and experienced hosting providers that seamlessly integrates with the Pterodactyl panel.
https://ctrlpanel.gg/
MIT License
390 stars 141 forks source link

[Bug]: Server name missing in notifications #833

Open GeckoBoy84 opened 1 year ago

GeckoBoy84 commented 1 year ago

What is your request about?

Server name is not included in suspend notifications

Branch

main

Solution idea

Add the server name to suspend notifications

Controlpanel Logs

No response

Additional Info

No response

1day2die commented 1 year ago

this is the case because once a user runs out of credits ALL servers get suspended obviously.

We have to keep this in mind thought and have to re-check the suspension logic because of the new billing cycles @IceToast

GeckoBoy84 commented 1 year ago

Not necessarily, all servers get suspended that cannot be paid for, but if they are cheaper you might last another few billing periods. Additionally you currently #246 get an email for each service so there is no way to differentiate between them

IceToast commented 1 year ago

With the new billing cycle each server must get suspended individually and thus sending a individual mail and/or notification

S0ly commented 1 month ago

and so have this been fixed in the dev branch ?

S0ly commented 2 weeks ago

@IceToast please

IceToast commented 2 weeks ago

Nope it hasnt been fixed yet. The app/Notifications/ServersSuspendedNotification.php handles the notification with a generic "All servers" since back then all servers have been suspended without the period system.

This could be done easily tho. Adding a prop to the notification and hand over the server name/id to the notification handler: app\Console\Commands\ChargeServers.php:131