split remaining utilities from shared

This commit is contained in:
Matteo Pagliazzi
2016-03-08 19:35:02 +01:00
parent bb6f0f4252
commit 986bfd8035
14 changed files with 266 additions and 246 deletions

View File

@@ -0,0 +1,10 @@
/*
Does user have new chat messages?
*/
module.exports = function(messages, lastMessageSeen) {
if (!((messages != null ? messages.length : void 0) > 0)) {
return false;
}
return (messages != null ? messages[0] : void 0) && (messages[0].id !== lastMessageSeen);
};