add helper to set the keysPending flag for a discussion

pull/6/head
sachaaaaa 7 years ago
parent 22a86b5351
commit d521795cf8

@ -403,13 +403,25 @@
if (this.isMe()) {
return false;
}
return this.get('keysPending') || true;
const keysPending = this.get('keysPending');
if (keysPending === undefined) {
keysPending = true;
}
return keysPending;
}
throw new Error(
'isKeysPending not implemented for groups'
);
},
setKeysPending(keysPending) {
if (typeof keysPending !== 'boolean') {
throw new Error(
'setKeysPending expects a boolean'
);
}
this.set({ keysPending });
},
isUnverified() {
if (this.isPrivate()) {
const verified = this.get('verified');

Loading…
Cancel
Save