Skip to content

Commit

Permalink
make machine cat for legit same as human
Browse files Browse the repository at this point in the history
  • Loading branch information
bwsarge committed Nov 12, 2023
1 parent 8a99a02 commit cf72061
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions functions/src/definitions/eventHandlers/userHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,11 @@ async function newTextInstanceHandler({
machineCategory !== "info"
)

const strippedMessage =
machineCategory === "legitimate"
? await anonymiseMessage(text, false)
: await anonymiseMessage(text, true)
let strippedMessage = await anonymiseMessage(text, true)

if (strippedMessage && machineCategory === "legitimate") {
strippedMessage = await anonymiseMessage(strippedMessage, false) //won't run for now till machineCategory returns legitimate
}

let rationalisation: null | string = null
if (
Expand Down

0 comments on commit cf72061

Please sign in to comment.