mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-29 20:52:15 -05:00
20 lines
405 B
JavaScript
20 lines
405 B
JavaScript
"use strict";
|
|
|
|
var BaseCollection = require('./baseCollection');
|
|
var Message = require('./message');
|
|
|
|
|
|
module.exports = BaseCollection.extend({
|
|
type: 'messages',
|
|
model: Message,
|
|
comparator: function (msg1, msg2) {
|
|
if (msg1.created < msg2.created) {
|
|
return -1;
|
|
}
|
|
if (msg1.created > msg2.created) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
});
|