Skip to content

Commit

Permalink
Merge pull request #352 from bettersg/develop
Browse files Browse the repository at this point in the history
3.0.7
  • Loading branch information
sarge1989 committed Jun 17, 2024
2 parents 09d3696 + 2c7894d commit 9f7ac43
Show file tree
Hide file tree
Showing 5 changed files with 13,287 additions and 14,118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"isUnsure": 0.5,
"isSus": 0.5,
"isSatire": 0.5,
"falseUpperBound": 2,
"falseUpperBound": 2.5,
"misleadingUpperBound": 4,
"sendInterimMinVotes": 1,
"surveyLikelihood": 1,
Expand Down
36 changes: 18 additions & 18 deletions functions/src/definitions/common/parameters/userResponses.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"UNTRUE": {
"en": "{{thanks}}{{matched}}{{methodology}}*untrue*.❌{{image_caveat}}\n\nPlease do not spread it further⛔️⛔️\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{matched}}{{methodology}}不属实。❌{{image_caveat}}\n\n请不要转发⛔️⛔️\n\n感谢您对新加坡网络安全的支持和贡献!\n"
"en": "{{thanks}}{{methodology}}*untrue*.❌{{image_caveat}}\n\nPlease do not spread it further⛔️⛔️\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{methodology}}不属实。❌{{image_caveat}}\n\n请不要转发⛔️⛔️\n\n感谢您对新加坡网络安全的支持和贡献!\n"
},
"MISLEADING": {
"en": "{{thanks}}{{matched}}{{methodology}}*presented in a misleading or unbalanced way*, even though some elements within could be true!⚠️{{image_caveat}}\n\nPlease take it with a pinch of salt and think twice before spreading it further🚧🚧.\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{matched}}{{methodology}}虽然包含一些真实的信息,但它存在误导性或缺乏公正性。⚠️{{image_caveat}}\n\n在分享之前,请三思🚧🚧。\n\n感谢您对新加坡网络安全的支持和贡献!"
"en": "{{thanks}}{{methodology}}*presented in a misleading or unbalanced way*, even though some elements within could be true!⚠️{{image_caveat}}\n\nPlease take it with a pinch of salt and think twice before spreading it further🚧🚧.\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{methodology}}虽然包含一些真实的信息,但它存在误导性或缺乏公正性。⚠️{{image_caveat}}\n\n在分享之前,请三思🚧🚧。\n\n感谢您对新加坡网络安全的支持和贡献!"
},
"ACCURATE": {
"en": "{{thanks}}{{matched}}{{methodology}}*accurate*.✅{{image_caveat}}\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{matched}}{{methodology}}是准确的。✅{{image_caveat}}\n\n感谢您对新加坡网络安全的支持和贡献!"
"en": "{{thanks}}{{methodology}}*accurate*.✅{{image_caveat}}\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{methodology}}是准确的。✅{{image_caveat}}\n\n感谢您对新加坡网络安全的支持和贡献!"
},
"SATIRE": {
"en": "{{thanks}}{{matched}}{{methodology}}*satirical in nature. Some elements may be untrue, but it's probably meant to be humourous rather than to deceive*.🙃{{image_caveat}}\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{matched}}{{methodology}}虽然包含一些真实的信息,但它存在误导性或缺乏公正性。🙃{{image_caveat}}\n\n感谢您对新加坡网络安全的支持和贡献!"
"en": "{{thanks}}{{methodology}}*satirical in nature. Some elements may be untrue, but it's probably meant to be humourous rather than to deceive*.🙃{{image_caveat}}\n\nThank you for keeping Singapore informed!",
"cn": "{{thanks}}{{methodology}}具有讽刺性质。虽然其中一些信息并不属实。不过它们似乎是以幽默的方式呈现,而不是恶意欺骗。🙃{{image_caveat}} \n\n感谢您对新加坡网络安全的支持和贡献!"
},
"ERROR": {
"en": "Oops, we encountered an error assessing this message.\n\nYou can try sending the message in again, or report the error via our form at https://bit.ly/checkmate-feedback. Sorry about that! 😔",
Expand All @@ -24,20 +24,20 @@
"cn": "你好!👋 感谢您使用查友!我们的查哥查妹🕵🏻会尽快评估这条短信并回复。"
},
"SCAM": {
"en": "{{thanks}}{{matched}}{{methodology}}*a scam*!🚫{{image_caveat}}\n\nWe recommend you do not engage further⛔️⛔️\n\nCheckMate will report suspicious messages to ScamShield (https://scamshield.org.sg) on your behalf.\n\nTo avoid reporting this message, select \"Don't report this\" below.",
"cn": "{{thanks}}{{matched}}{{methodology}}是诈骗信息! 🚫{{image_caveat}}\n\n建议您停止交流⛔️⛔️\n\n查友会代表您向ScamShield (https://scamshield.org.sg) 举报这条可疑的短信。\n\n如果您不想举报此短信,请选择\"不举报\""
"en": "{{thanks}}{{methodology}}*a scam*!🚫{{image_caveat}}\n\nWe recommend you do not engage further⛔️⛔️\n\nCheckMate will report suspicious messages to ScamShield (https://scamshield.org.sg) on your behalf.\n\nTo avoid reporting this message, select \"Don't report this\" below.",
"cn": "{{thanks}}{{methodology}}是诈骗信息! 🚫{{image_caveat}}\n\n建议您停止交流⛔️⛔️\n\n查友会代表您向ScamShield (https://scamshield.org.sg) 举报这条可疑的短信。\n\n如果您不想举报此短信,请选择\"不举报\""
},
"ILLICIT": {
"en": "{{thanks}}{{matched}}{{methodology}}*suspicious*!🚨{{image_caveat}}\n\nWe recommend you do not engage further⛔️⛔️\n\nCheckMate will report suspicious messages to ScamShield (https://scamshield.org.sg) on your behalf.\n\nTo avoid reporting this message, select \"Don't report this\" below.",
"cn": "{{thanks}}{{matched}}{{methodology}}很可疑!🚨{{image_caveat}}\n\n建议您停止交流⛔️⛔️\n\n查友会代表您向ScamShield (https://scamshield.org.sg) 举报这条可疑的短信。\n\n如果您不想举报此短信,请选择\"不举报\""
"en": "{{thanks}}{{methodology}}*suspicious*!🚨{{image_caveat}}\n\nWe recommend you do not engage further⛔️⛔️\n\nCheckMate will report suspicious messages to ScamShield (https://scamshield.org.sg) on your behalf.\n\nTo avoid reporting this message, select \"Don't report this\" below.",
"cn": "{{thanks}}{{methodology}}很可疑!🚨{{image_caveat}}\n\n建议您停止交流⛔️⛔️\n\n查友会代表您向ScamShield (https://scamshield.org.sg) 举报这条可疑的短信。\n\n如果您不想举报此短信,请选择\"不举报\""
},
"SPAM": {
"en": "{{thanks}}{{matched}}{{methodology}}spam!🚧{{image_caveat}}\n\nIt's likely harmless, but you should always make sure 🧐\n\nThank you for keeping Singapore safe!",
"cn": "{{thanks}}{{matched}}{{methodology}}是垃圾信息!🚧{{image_caveat}}\n\n虽然它看似无害,但请仍然保持警惕 🧐\n\n感谢您对新加坡网络安全的支持和贡献!"
"en": "{{thanks}}{{methodology}}spam!🚧{{image_caveat}}\n\nIt's likely harmless, but you should always make sure 🧐\n\nThank you for keeping Singapore safe!",
"cn": "{{thanks}}{{methodology}}是垃圾信息!🚧{{image_caveat}}\n\n虽然它看似无害,但请仍然保持警惕 🧐\n\n感谢您对新加坡网络安全的支持和贡献!"
},
"LEGITIMATE": {
"en": "{{thanks}}{{matched}}{{methodology}}*from a legitimate source*.✅{{image_caveat}}\n\nThank you for keeping Singapore safe!",
"cn": "{{thanks}}{{matched}}{{methodology}}的来源是可靠的。✅{{image_caveat}}\n\n感谢您对新加坡网络安全的支持和贡献!"
"en": "{{thanks}}{{methodology}}*from a legitimate source*.✅{{image_caveat}}\n\nThank you for keeping Singapore safe!",
"cn": "{{thanks}}{{methodology}}的来源是可靠的。✅{{image_caveat}}\n\n感谢您对新加坡网络安全的支持和贡献!"
},
"UNSURE": {
"en": "{{thanks}}\n\nUnfortunately, our CheckMates are *unsure about this message*🤷🏻‍♂️🤷🏻‍♀️. Sorry, we're human too!😞\n\nIf you haven't done so, you could send in the message with more context, e.g. sending in a screenshot containing the sender's number.\n\nThank you for keeping Singapore safe!",
Expand All @@ -52,8 +52,8 @@
"cn": "感谢您的耐心等待!"
},
"IMAGE_CAVEAT": {
"en": "This assessment refers to any claims made within the captions. If there are no claims/captions, it refers to the image itself.",
"cn": "我们的评估基于图片标题中的内容。如果您提交的短信里没有文字标题,我们对图片本身的内容进行了评估。"
"en": "This assessment refers to the claims made within the captions, if any.",
"cn": "我们的评估基于图片标题中的内容。"
},
"METHODOLOGY_HUMAN": {
"en": "Our CheckMates have reviewed this message and think it's ",
Expand Down
6 changes: 5 additions & 1 deletion functions/src/definitions/common/responseUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ async function respondToInstance(
const customReply: CustomReply = parentMessageSnap.get("customReply")
const { validResponsesCount } = await getVoteCounts(parentMessageRef)
const isImage = data?.type === "image"
const hasCaption = data?.caption != null
const isMatched = data?.isMatched ?? false
const primaryCategory = parentMessageSnap.get("primaryCategory")

Expand All @@ -649,7 +650,10 @@ async function respondToInstance(
? responses.METHODOLOGY_HUMAN_PREVIOUS
: responses.METHODOLOGY_HUMAN
)
.replace("{{image_caveat}}", isImage ? responses.IMAGE_CAVEAT : "")
.replace(
"{{image_caveat}}",
isImage && hasCaption ? responses.IMAGE_CAVEAT : ""
)
}

let category = primaryCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async function despatchPoll(
const latestInstanceSnap = await latestInstanceRef.get()
const type = latestInstanceSnap.get("type") ?? null
if (type === "text") {
const text = latestInstanceSnap.get("text")
const text = messageSnap.get("text")
if (text) {
if (text.length > 50) {
previewText = text.substring(0, 50) + "..."
Expand Down
Loading

0 comments on commit 9f7ac43

Please sign in to comment.