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-e2e/server/models/Subscriptions.js

19 lines
442 B

import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.models.Subscriptions.updateGroupE2EKey = function(_id, key) {
const query = { _id };
const update = { $set: { E2EKey: key } };
this.update(query, update);
return this.findOne({ _id });
};
RocketChat.models.Subscriptions.findByRidWithoutE2EKey = function(rid, options) {
const query = {
rid,
E2EKey: {
$exists: false,
},
};
return this.find(query, options);
};