Refactor and add tests to flagged messages.

This commit is contained in:
Blade Barringer
2015-11-03 08:00:14 -06:00
parent 24480e5f04
commit 1a68b5e9ee
4 changed files with 19 additions and 13 deletions

View File

@@ -475,11 +475,6 @@ GroupSchema.methods.leave = function(user, keep, mainCb){
GroupSchema.methods.toJSON = function() {
var doc = this.toObject();
if(doc.chat){
doc.chat.forEach(function(msg){
msg.flags = {};
});
}
return doc;
};