fix(notify): Fix XML Filter parsing and add comprehensive tests (#2191)

This commit is contained in:
houseme
2026-03-17 23:08:07 +08:00
committed by GitHub
parent ce1f7cfdcb
commit b5d881f399
9 changed files with 1208 additions and 24 deletions
+5 -9
View File
@@ -111,15 +111,11 @@ pub mod notifier_global {
suffix: &str,
target_ids: &[TargetID],
) -> Result<(), NotificationError> {
// Construct pattern, simple splicing of prefixes and suffixes
let mut pattern = String::new();
if !prefix.is_empty() {
pattern.push_str(prefix);
}
pattern.push('*');
if !suffix.is_empty() {
pattern.push_str(suffix);
}
// Construct pattern using proper pattern function
let pattern = crate::rules::pattern::new_pattern(
if prefix.is_empty() { None } else { Some(prefix) },
if suffix.is_empty() { None } else { Some(suffix) },
);
// Create BucketNotificationConfig
let mut bucket_config = BucketNotificationConfig::new(region);