Block private silence from face speech
This commit is contained in:
parent
af74530d2e
commit
07066ca8ea
4 changed files with 22 additions and 1 deletions
|
|
@ -850,7 +850,7 @@ function normalizeBareInterpreterSayCandidate(interpretationText: string): strin
|
|||
if (/^(INTERPRETATION|Private summary|STATE NOTE|ARTICLE|REDDIT THREAD|BIFROST TOPIC|UPDATE REQUEST)\b/i.test(content)) {
|
||||
return undefined;
|
||||
}
|
||||
if (/\b(stay quiet|cleaner reply is to stay quiet|if you want a line at all|would say nothing|no public line)\b/i.test(content)) {
|
||||
if (/\b(stay quiet|stay private|cleaner reply is to stay quiet|if you want a line at all|would say nothing|no public line|no public speech|nothing public|nothing right now|nothing yet|hold silence)\b/i.test(content)) {
|
||||
return undefined;
|
||||
}
|
||||
return content;
|
||||
|
|
|
|||
|
|
@ -71,12 +71,22 @@ export function isNonPublicRepoIdentitySpeech(value: string): boolean {
|
|||
.toLowerCase()
|
||||
.replace(/[.!?]+$/g, "")
|
||||
.trim();
|
||||
if (/^(nothing|nothing public|nothing private|nothing right now|nothing yet|no public(?: line| speech)?|stay private|stay quiet)\b/.test(normalized)) {
|
||||
return true;
|
||||
}
|
||||
if (/\b(no public line|no public speech|nothing public yet|nothing public right now|would say nothing|hold silence|stay private|stay quiet)\b/.test(normalized)) {
|
||||
return true;
|
||||
}
|
||||
return [
|
||||
"nothing",
|
||||
"nothing right now",
|
||||
"nothing public",
|
||||
"nothing public yet",
|
||||
"nothing public right now",
|
||||
"nothing in aquarium",
|
||||
"stay private",
|
||||
"stay quiet",
|
||||
"no public line",
|
||||
"no public speech",
|
||||
].includes(normalized);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue