3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-01-21 01:34:20 +01:00

list push subscription times as well

This commit is contained in:
Shivaram Lingamneni 2025-01-15 22:12:40 -05:00
parent 92e2aa987e
commit e520ba7e0e

View File

@ -1686,7 +1686,10 @@ func nsPushHandler(service *ircService, server *Server, client *Client, command
subscriptions := target.getPushSubscriptions() subscriptions := target.getPushSubscriptions()
service.Notice(rb, fmt.Sprintf(client.t("Nickname %[1]s has %[2]d push subscription(s)"), target.Nick(), len(subscriptions))) service.Notice(rb, fmt.Sprintf(client.t("Nickname %[1]s has %[2]d push subscription(s)"), target.Nick(), len(subscriptions)))
for i, subscription := range subscriptions { for i, subscription := range subscriptions {
service.Notice(rb, fmt.Sprintf("%d: %s", i, subscription.Endpoint)) service.Notice(rb, fmt.Sprintf(client.t("Subscription %d:"), i+1))
service.Notice(rb, fmt.Sprintf(client.t("Endpoint: %s"), subscription.Endpoint))
service.Notice(rb, fmt.Sprintf(client.t("Last renewal: %s"), subscription.LastRefresh.Format(time.RFC1123)))
service.Notice(rb, fmt.Sprintf(client.t("Last push: %s"), subscription.LastSuccess.Format(time.RFC1123)))
} }
case "DELETE": case "DELETE":
if len(params) < 2 { if len(params) < 2 {