mirror of
https://github.com/thelounge/thelounge
synced 2024-12-25 03:43:12 +00:00
25 lines
354 B
JavaScript
25 lines
354 B
JavaScript
var _ = require("lodash");
|
|
|
|
module.exports = Chan;
|
|
|
|
Chan.Type = {
|
|
CHANNEL: "channel",
|
|
LOBBY: "lobby",
|
|
QUERY: "query"
|
|
};
|
|
|
|
var id = 0;
|
|
|
|
function Chan(attr) {
|
|
_.merge(this, _.extend({
|
|
id: id++,
|
|
type: Chan.Type.CHANNEL,
|
|
name: "",
|
|
messages: [],
|
|
users: []
|
|
}, attr));
|
|
}
|
|
|
|
Chan.prototype.sortUsers = function() {
|
|
// ..
|
|
};
|