mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue