Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
139a887c24 |
@@ -561,7 +561,7 @@ fn mentions(event: &ForgeEvent, handle: &str) -> bool {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
let needle = format!("@{}", handle.to_lowercase());
|
let needle = format!("@{}", handle.to_lowercase());
|
||||||
body.to_lowercase().contains(&needle)
|
body.to_lowercase().contains(needle.as_str())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The batch's dominant role, for the prompt's persona framing:
|
/// The batch's dominant role, for the prompt's persona framing:
|
||||||
@@ -894,8 +894,9 @@ mod tests {
|
|||||||
NotificationReason::Assigned,
|
NotificationReason::Assigned,
|
||||||
))
|
))
|
||||||
.expect("the triaged payload decodes");
|
.expect("the triaged payload decodes");
|
||||||
assert!(addressed(&[notified], Some("kosmos")));
|
let news = [notified];
|
||||||
assert!(addressed(&[notified], None), "a notification needs no handle");
|
assert!(addressed(&news, Some("kosmos")));
|
||||||
|
assert!(addressed(&news, None), "a notification needs no handle");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// With no handle to look for, the gate stays open: silently turning a
|
/// With no handle to look for, the gate stays open: silently turning a
|
||||||
|
|||||||
Reference in new issue
Block a user