Minor bugfix
This commit is contained in:
parent
543cab46e4
commit
c2ff4566fa
@ -1,6 +1,7 @@
|
||||
var _ = require("lodash");
|
||||
var Chan = require("../models/chan");
|
||||
var Msg = require("../models/msg");
|
||||
var User = require("../models/user");
|
||||
|
||||
module.exports = function(client, sockets) {
|
||||
var network = this;
|
||||
@ -16,6 +17,13 @@ module.exports = function(client, sockets) {
|
||||
chan: chan,
|
||||
});
|
||||
}
|
||||
var users = chan.users;
|
||||
users.push(new User({name: data.nick}));
|
||||
chan.sortUsers();
|
||||
sockets.in("chat").emit("users", {
|
||||
id: chan.id,
|
||||
users: users,
|
||||
});
|
||||
var msg = new Msg({
|
||||
from: data.nick,
|
||||
type: "join",
|
||||
|
Loading…
Reference in New Issue
Block a user