ensl_gathers/lib/chat/message.js
Chris Blanchard b91e812fcd Change case
2015-07-22 14:53:50 +01:00

22 lines
No EOL
385 B
JavaScript

"use strict";
var Author = require("./author");
function Message (o) {
this.author = Author(o.author);
this.content = o.content;
this.createdAt = new Date();
};
Message.prototype.toJson = function () {
return {
author: {
username: this.author.username,
avatar: this.author.avatar
},
content: this.content,
createdAt: this.createdAt
}
};
module.exports = Message;