fix message delete and add test

This commit is contained in:
Barış Soner Uşaklı
2017-08-21 16:48:18 -04:00
parent 1875764aca
commit a46db9616c
2 changed files with 12 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ module.exports = function (Messaging) {
var keys = uids.map(function (uid) {
return 'uid:' + uid + ':chat:room:' + roomId + ':mids';
});
db.sortedSetsRemove(keys, roomId, next);
db.sortedSetsRemove(keys, mid, next);
},
function (next) {
db.delete('message:' + mid, next);