address: contains, not any

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-06 23:00:46 +01:00
commit f6b6cb3899

View file

@ -48,7 +48,7 @@ pub(crate) fn localpart(matrix_id: &str) -> &str {
/// Whether a delivery is for `who`: tagged, or named by a word of hers.
pub(crate) fn addresses(who: &Addressee, delivery: &ChatDelivery) -> bool {
delivery.mentions.iter().any(|id| *id == who.matrix_id) || who.names.iter().any(|name| names_whole_word(&delivery.text, &name.text, name.exact))
delivery.mentions.contains(&who.matrix_id) || who.names.iter().any(|name| names_whole_word(&delivery.text, &name.text, name.exact))
}
/// The chat names of one stewarded repo. Listed names are exactly those, each matched exactly as the steward wrote it (capitalization