始终发送ip变更通知+优化ssl与延迟通知静音缓存规则

This commit is contained in:
Akkia
2023-06-19 05:02:20 +08:00
parent 865848668b
commit 966dfc0496
4 changed files with 86 additions and 42 deletions

View File

@@ -102,6 +102,11 @@ func OnDeleteNotification(id uint64) {
delete(NotificationIDToTag, id)
}
func UnMuteNotification(notificationTag string, muteLabel *string) {
fullMuteLabel := *NotificationMuteLabel.AppendNotificationTag(muteLabel, notificationTag)
Cache.Delete(fullMuteLabel)
}
// SendNotification 向指定的通知方式组的所有通知方式发送通知
func SendNotification(notificationTag string, desc string, muteLabel *string, ext ...*model.Server) {
if muteLabel != nil {
@@ -199,7 +204,7 @@ func (_NotificationMuteLabel) ServiceStateChanged(serviceId uint64) *string {
return &label
}
func (_NotificationMuteLabel) ServiceSSL(serviceId uint64) *string {
label := fmt.Sprintf("bf::sssl-%d", serviceId)
func (_NotificationMuteLabel) ServiceSSL(serviceId uint64, extraInfo string) *string {
label := fmt.Sprintf("bf::sssl-%d-%s", serviceId, extraInfo)
return &label
}