s2s: announce remote members arriving via FJOIN to local channel members

This commit is contained in:
Jean Chevronnet 2026-08-16 19:26:10 +00:00
parent ef84846267
commit 68b80c3f82

View file

@ -2132,9 +2132,20 @@ impl Server {
} }
adds.push((uuid, m)); adds.push((uuid, m));
} }
if let Some(ch) = self.channels.get_mut(&key) { for (uuid, m) in adds {
for (uuid, m) in adds { let already = self
ch.rmembers.insert(uuid, m); .channels
.get(&key)
.map(|c| c.rmembers.contains_key(&uuid))
.unwrap_or(false);
if let Some(ch) = self.channels.get_mut(&key) {
ch.rmembers.insert(uuid.clone(), m);
}
// announce the join to local members (a no-op for a brand-new channel)
if !already {
if let Some(prefix) = self.remote_users.get(&uuid).map(|r| r.prefix()) {
self.to_channel(&key, &format!(":{prefix} JOIN {chan}"), None);
}
} }
} }
let raw = format!( let raw = format!(