Make sure all joins send filtered clone
This commit is contained in:
parent
fe1c7612f5
commit
5fc70397a9
@ -47,6 +47,6 @@ exports.input = function(network, chan, cmd, args) {
|
||||
network.channels.push(newChan);
|
||||
this.emit("join", {
|
||||
network: network.id,
|
||||
chan: newChan,
|
||||
chan: newChan.getFilteredClone(true),
|
||||
});
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ module.exports = function(irc, network) {
|
||||
network.channels.push(chan);
|
||||
client.emit("join", {
|
||||
network: network.id,
|
||||
chan: chan,
|
||||
chan: chan.getFilteredClone(true),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ module.exports = function(irc, network) {
|
||||
client.save();
|
||||
client.emit("join", {
|
||||
network: network.id,
|
||||
chan: chan,
|
||||
chan: chan.getFilteredClone(true),
|
||||
});
|
||||
|
||||
// Request channels' modes
|
||||
|
@ -49,7 +49,7 @@ module.exports = function(irc, network) {
|
||||
network.channels.push(chan);
|
||||
client.emit("join", {
|
||||
network: network.id,
|
||||
chan: chan,
|
||||
chan: chan.getFilteredClone(true),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ module.exports = function(irc, network) {
|
||||
network.channels.push(chan);
|
||||
client.emit("join", {
|
||||
network: network.id,
|
||||
chan: chan,
|
||||
chan: chan.getFilteredClone(true),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ module.exports = function(irc, network) {
|
||||
client.emit("join", {
|
||||
shouldOpen: true,
|
||||
network: network.id,
|
||||
chan: chan,
|
||||
chan: chan.getFilteredClone(true),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -208,6 +208,8 @@ describe("Chan", function() {
|
||||
expect(messages).to.have.lengthOf(4);
|
||||
expect(messages[0].id).to.equal(10);
|
||||
expect(messages[3].id).to.equal(13);
|
||||
|
||||
expect(chan.getFilteredClone(true).messages).to.have.lengthOf(4);
|
||||
});
|
||||
|
||||
it("should only send new messages", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user