forked from CringeStudios/gamja
Fix cross-network mixups when handling QUIT and NICK
Only mutate buffers if they belong to our connection.
This commit is contained in:
parent
b2cdab86aa
commit
f36bba897e
@ -733,6 +733,9 @@ export default class App extends Component {
|
||||
this.setState((state) => {
|
||||
var buffers = new Map(state.buffers);
|
||||
state.buffers.forEach((buf) => {
|
||||
if (buf.network != netID) {
|
||||
return;
|
||||
}
|
||||
if (!buf.members.has(msg.prefix.name) && buf.name != msg.prefix.name) {
|
||||
return;
|
||||
}
|
||||
@ -753,6 +756,9 @@ export default class App extends Component {
|
||||
this.setState((state) => {
|
||||
var buffers = new Map(state.buffers);
|
||||
state.buffers.forEach((buf) => {
|
||||
if (buf.network != netID) {
|
||||
return;
|
||||
}
|
||||
if (!buf.members.has(msg.prefix.name)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user