Persona wake: own_rooms takes its repos and aliases at their own lifetimes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-27 21:08:40 +01:00
commit 355b6237a6

View file

@ -514,7 +514,7 @@ pub fn own_rooms_among<'a>(mind: &dyn MindPort, aliases: impl IntoIterator<Item
/// Which of `aliases` are her own rooms: those named for a repo she stewards (`#huginn:gamecult.org` for `GameCult/Huginn`),
/// case-blind. A direct message is hers by `address::is_for`, not by name.
pub(crate) fn own_rooms<'a>(repos: impl IntoIterator<Item = &'a str>, aliases: impl IntoIterator<Item = &'a str>) -> Vec<String> {
pub(crate) fn own_rooms<'r, 'a>(repos: impl IntoIterator<Item = &'r str>, aliases: impl IntoIterator<Item = &'a str>) -> Vec<String> {
let names: Vec<&str> = repos.into_iter().map(|repo| repo.rsplit_once('/').map_or(repo, |(_, name)| name)).collect();
let mut found: Vec<String> = Vec::new();
for alias in aliases {