|
|
@ -28,6 +28,11 @@ var db = require('./database'),
|
|
|
|
touid: touid
|
|
|
|
touid: touid
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('filter:messaging.save', message, function(err, message) {
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
return callback(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
db.setObject('message:' + mid, message, function(err) {
|
|
|
|
db.setObject('message:' + mid, message, function(err) {
|
|
|
|
if (err) {
|
|
|
|
if (err) {
|
|
|
|
return callback(err);
|
|
|
|
return callback(err);
|
|
|
@ -43,6 +48,7 @@ var db = require('./database'),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Messaging.getMessages = function(fromuid, touid, isNew, callback) {
|
|
|
|
Messaging.getMessages = function(fromuid, touid, isNew, callback) {
|
|
|
|