actor: prevent relaying back to the originating instance

This commit is contained in:
Astro 2023-06-16 21:25:46 +02:00
parent 4d74af642e
commit f55ee48c03

View file

@ -194,6 +194,10 @@ pub fn spawn(
} }
seen_inboxes.insert(inbox); seen_inboxes.insert(inbox);
// Prevent relaying back to the originating instance.
if inbox_url.host_str() == post_url_url.host_str() {
continue;
}
// Lookup/create worker queue per inbox. // Lookup/create worker queue per inbox.
let tx = workers.entry(inbox_url.host_str().unwrap_or("").to_string()) let tx = workers.entry(inbox_url.host_str().unwrap_or("").to_string())