The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/rocketchat-livechat/server/models/Messages.js

27 lines
415 B

RocketChat.models.Messages.keepHistoryForToken = function(token) {
return this.update({
'navigation.token': token,
expireAt: {
$exists: true,
},
}, {
$unset: {
expireAt: 1,
},
}, {
multi: true,
});
};
RocketChat.models.Messages.setRoomIdByToken = function(token, rid) {
return this.update({
'navigation.token': token,
rid: null,
}, {
$set: {
rid,
},
}, {
multi: true,
});
};