channel: scrub a departed user from every +i invite list (invited-then-quit leaked a Uid on persistent channels)
This commit is contained in:
parent
0da0906dc9
commit
de4cf9866d
1 changed files with 6 additions and 0 deletions
|
|
@ -690,6 +690,12 @@ impl Server {
|
||||||
for m in seen {
|
for m in seen {
|
||||||
self.send(m, line.clone());
|
self.send(m, line.clone());
|
||||||
}
|
}
|
||||||
|
// Scrub any pending +i invite for this user from channels they never joined
|
||||||
|
// (a member consumes their invite on join; a never-joined invite for a now-
|
||||||
|
// departed uid would otherwise linger forever on a persistent channel).
|
||||||
|
for ch in self.channels.values_mut() {
|
||||||
|
ch.invites.remove(&uid);
|
||||||
|
}
|
||||||
self.channels.retain(|_, c| c.keep_alive());
|
self.channels.retain(|_, c| c.keep_alive());
|
||||||
self.watch_notify_offline(&user.nick); // tell WATCH/MONITOR watchers
|
self.watch_notify_offline(&user.nick); // tell WATCH/MONITOR watchers
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue