core: add PRIV_SEND_MESSAGE

This commit is contained in:
undefined committed 2021-05-28 22:52:12 +08:00
1 parent be2b1c5524
commit 01d6d48c74
5 files changed
+12 -3

No files matched your search

+1 -1
View File
@@ -248,7 +248,7 @@ export class ProblemModel {
const ddocs = await Promise.all(Object.keys(parsed).map((i) => domain.get(i)));
const f = ddocs.filter((i) => !(
i.share === '*'
|| (`,${i.share.replace(/,/g, ',').split(',').map((q) => q.trim()).join(',')},`).includes(`,${domainId},`)
|| (`,${(i.share || '').replace(/,/g, ',').split(',').map((q) => q.trim()).join(',')},`).includes(`,${domainId},`)
));
if (f.length) {
if (doThrow) throw new ProblemNotFoundError(f[0]._id, parsed[f[0]._id][0].pid);