所以找了個熱門謠言用 google translate 翻成英文之後丟進去讓他跑跑看
是不是可以拿來變成圖
好像有點有趣
image.png

g0v.hackmd.io
![]()
<https://github.com/cofacts/rumors-line-bot/pull/321|#321 Fix image search on chatbot>
We observed that duplicate images are being submitted to Cofacts. According to the analysis in <https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#%E4%B8%8A%E7%B7%9A%E5%BE%8C%E8%BF%BD%E8%B9%A4%EF%BC%9A%E9%87%8D%E8%A4%87%E5%9C%96%E7%89%87|https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#%E4%B8%8A%E7%B7%9A%E5%BE%8C%E8%BF%BD%E8%B9%A4%EF%BC%9A%E9%87%8D%E8%A4%87%E5%9C%96%E7%89%87> , the root cause is • Production server does not have `MEDIA_ARTICLE_SUPPORT` turned on • Chatbot does not specify `articleTypes` so that only text is returned by default • Therefore, when chatbot user sends a very similar image, API always returns empty image search response This PR fixes the duplicate image submission problem by specifying all article types so that no matter what API's `MEDIA_ARTICLE_SUPPORT` is, chatbot can get all media results.
:white_check_mark: All checks have passed
<https://github.com/cofacts/rumors-line-bot/pull/321|#321 [processImage] >
We observed that duplicate images are being submitted to Cofacts. According to the analysis in <https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#%E4%B8%8A%E7%B7%9A%E5%BE%8C%E8%BF%BD%E8%B9%A4%EF%BC%9A%E9%87%8D%E8%A4%87%E5%9C%96%E7%89%87|https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#%E4%B8%8A%E7%B7%9A%E5%BE%8C%E8%BF%BD%E8%B9%A4%EF%BC%9A%E9%87%8D%E8%A4%87%E5%9C%96%E7%89%87> , the root cause is • Production server does not have `MEDIA_ARTICLE_SUPPORT` turned on • Chatbot does not specify `articleTypes` so that only text is returned by default This PR fixes the duplicate image submission problem by specifying all article types so that no matter what API's `MEDIA_ARTICLE_SUPPORT` is, chatbot can get all media results.
*Pull Request Test Coverage Report for <https://coveralls.io/builds/52272513|Build 3007073645>* • *0* of *0* changed or added relevant lines in *0* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage remained the same at *91.52%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
*Pull Request Test Coverage Report for <https://coveralls.io/builds/52272513|Build 3007073645>* • *0* of *0* changed or added relevant lines in *0* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage remained the same at *91.52%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
Review on #321 Fix image search on chatbot
LGTM!
Review on #321 Fix image search on chatbot
LGTM!
<https://github.com/cofacts/rumors-line-bot/issues/322|#322 Handle duplicate image messaages>
In <https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#Case-%E7%99%BD%E8%9D%99%E8%9D%A0|20220907 meeting> we discussed several cases when users may submit images that is highly similar to existing images in the database. We will use this ticket to track the issue and see if we should mitigate this issue further (such as using image hash as article hash; don't change article ID if we change hashing algorithm)
<https://github.com/cofacts/rumors-line-bot/issues/322|#322 Handle duplicate image messaages>
In <https://g0v.hackmd.io/FYQIQOIgQ1evVfzG-33fwg#Case-%E7%99%BD%E8%9D%99%E8%9D%A0|20220907 meeting> we discussed several cases when users may submit images that is highly similar to existing images in the database. We will use this ticket to track the issue and see if we should mitigate this issue further (such as using image hash as article hash; don't change article ID if we change hashing algorithm)