core: record: pretest check for empty input

pull/564/head^2
undefined 1 year ago
parent 284c2c5cf5
commit 7f7154b7ca
No known key found for this signature in database

@ -290,7 +290,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
async onRecordChange(rdoc: RecordDoc) { async onRecordChange(rdoc: RecordDoc) {
if (!this.all) { if (!this.all) {
if (rdoc.domainId !== this.args.domainId) return; if (rdoc.domainId !== this.args.domainId) return;
if (!this.pretest && rdoc.input) return; if (!this.pretest && typeof rdoc.input === 'string') return;
if (rdoc.contest && ![this.tid, '000000000000000000000000'].includes(rdoc.contest.toString())) return; if (rdoc.contest && ![this.tid, '000000000000000000000000'].includes(rdoc.contest.toString())) return;
if (this.tid && rdoc.contest?.toString() !== '0'.repeat(24)) { if (this.tid && rdoc.contest?.toString() !== '0'.repeat(24)) {
if (contest.isLocked(this.tdoc)) return; if (contest.isLocked(this.tdoc)) return;

Loading…
Cancel
Save