Archive of the USPol Labeler's automatic labeling script. Out-of-date. Must run alongside Ozone. DO NOT OPEN ISSUES OR PULLS -- THEY WILL BE IGNORED/CLOSED
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(report): bonus point only matches wouldn't get escalated

+19 -1
+19 -1
src/handler.ts
··· 223 223 delete matchedKeywords[fullLabel]; 224 224 } 225 225 if (Object.keys(scores).length > 0 && Object.entries(scores).some(([_,v]) => v > 0)) { 226 - if (Object.keys(scores).length == 1 && scores["bonus-points-only"]) return; 226 + if (Object.keys(scores).length == 1 && scores["bonus-points-only"]) { 227 + if (!opts.isReport) return; 228 + if (DRY_RUN) { 229 + console.info(" * Escalated due to report"); 230 + console.info(" * Bonus points matched: "+matchedKeywords["bonus-points-only"].join(", ")); 231 + } 232 + if (!DRY_RUN) await agent.tools.ozone.moderation.emitEvent({ 233 + event: { 234 + $type: "tools.ozone.moderation.defs#modEventEscalate", 235 + comment: `[Automated] Escalated due to report (only bonus points matched: ${matchedKeywords["bonus-points-only"].join(", ")})`, 236 + }, 237 + subject: { 238 + $type: "com.atproto.repo.strongRef", 239 + uri: post.uri, 240 + cid: post.cid 241 + }, 242 + createdBy: me.data.did, 243 + }); 244 + }; 227 245 // Add share points to each category, if multiple categories are present: 228 246 if (Object.keys(scores).length >= 2) { 229 247 // if there are multiple entries...