cofacts

Month: 2020-11

2020-11-01

valentin-劉君磊 14:05:52
@floquetvalentin has joined the channel
🐳 1 ❤️ 1 🦒 1
a-chioh 17:15:02
@a-chioh has joined the channel

2020-11-02

github 14:08:03

Review on #231 On-boarding tutorial

The unit tests are extremely helpful when I read through the code. Thanks for providing the thorough tests cases! I have some comments regarding wording and how `replies` array can be constructed.

請問今天開會前有機會 merge 嗎 @acerxp511
應該可以吧
github 14:08:03

Comment on #231 On-boarding tutorial

Please replace `"send your message to our chatroom"` with `"Send messages to chats"` to match <https://github.com/cofacts/rumors-line-bot/issues/216#issuecomment-718374931|LINE UI> and also update the translate file key, thanks!

請問今天開會前有機會 merge 嗎 @acerxp511
應該可以吧
github 14:08:03

Comment on #231 On-boarding tutorial

It seems that `createPermissionSetupDialog` does not return a promise, thus no need to `await` here? Please check if all `await` in this method are necessary. If all of them are not, we may remove `async` for `tutorial()` as well :+1: Another thing is, no matter we need `await` or not, the construction of `replies` can be simplied using object spread operator: ``` replies = [ { type: 'text', text: replyProvidePermissionSetup, }, { ...await createPermissionSetupDialog(askForPermissionSetup), quickReply: {...} }, ] ``` The pattern above can be applied to all other `if` cases and replace all `replies.push()` invocation.

請問今天開會前有機會 merge 嗎 @acerxp511
應該可以吧
github 14:08:03

Comment on #231 On-boarding tutorial

Why does serve middleware not work for dev environment?

請問今天開會前有機會 merge 嗎 @acerxp511
應該可以吧

2020-11-03

github 14:34:16

Comment on #231 [wip] Cleanuptests

<https://coveralls.io/builds/34667833|Coverage Status> Coverage decreased (-0.03%) to 86.035% when pulling *<https://github.com/cofacts/rumors-api/commit/f4ec4b2c9d52c7fa56533a2a7ef27fb72e2bc441|f4ec4b2> on cleanuptests* into *<https://github.com/cofacts/rumors-api/commit/177693c345bcbbed7e442f1c71fec3bf3a075e0e|177693c> on backendUsers*.

2020-11-04

github 14:11:01

Comment on #227 index user if not existed and log last active time for user accessing apis via backend apps

Nit: seems that this file is no longer a graphql mutation and is more like a util function. Maybe we can consider moving it to `graphql/models/User`, or move to `util` (along with all utility functions under `graphql/models/User`). We may <https://github.com/magicmark/jest-how-do-i-mock-x/blob/master/src/function-in-same-module/README.md|need some work around to properly mock these utility in the same file>.

github 14:11:01

Comment on #227 index user if not existed and log last active time for user accessing apis via backend apps

nit: `appUserId` here actually can be db user id or app user id. Maybe we can denote this in the doc string, or even choose to change argument name to `dbOrAppUserId` or just `userId`.

github 14:11:01

Review on #227 index user if not existed and log last active time for user accessing apis via backend apps

LGTM! Thanks for the fix! Added some nit-picking comments that should not be merge blockers. Feel free to adapt and merge anytime :)

github 14:26:32

Comment on #231 Cleanup tests

nit: indent XD

github 14:26:32

Review on #231 Cleanup tests

It's looking great! Thanks for making the tests more robust!

github 14:59:26

Comment on #231 On-boarding tutorial

I don't know liff uses proxy to a webpack server for development, just copy and paste the `/liff` part to apply `/static` at that time.

github 15:09:18

Comment on #231 On-boarding tutorial

Text will ellipsis before assigning to altText, so the snapshot looks a little weird.

github 19:33:06

Review on #231 On-boarding tutorial

LGTM! Let's merge!

hsiao 20:35:15
@yutunghsiao19 has joined the channel
wesley zeng 20:45:01
@zengwesley31729 has joined the channel
github 22:45:18

#233 Update tutorial wording and compress images

Details see : <https://g0v.hackmd.io/Sl_84QO8TQ6WKKI0bT4pYw#%E6%9C%AA%E7%AB%9F%E9%A0%85%E7%9B%AE|https://g0v.hackmd.io/Sl_84QO8TQ6WKKI0bT4pYw#%E6%9C%AA%E7%AB%9F%E9%A0%85%E7%9B%AE>

github 23:06:23

Comment on #233 Update tutorial wording and compress images

*Pull Request Test Coverage Report for <https://coveralls.io/builds/34710866|Build 1202>* • *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 *85.94%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*

2020-11-05

nonumpa 12:48:21
我發現這兩張圖倒過來了 囧
Screenshot_20201105-124700.png
#測試時記得要清 LINE 的 cache
#雖然清了也不一定會發現圖片順序反了
XDDD
其實我沒試過我們用的那個 koa-sendfile 是否可以讓我們在檔案名稱後面加上 `?cachebust=xxx`
需要麻煩 @acerxp511 測測看惹
如果可以的話那我們可以補一下 cache bust param 確保使用者拿得到新的 build 的圖
github 13:03:58

#234 Fix tutorial image order

Fix wrong image order caused by commit `Compress tutorial images`. bug snapshot <https://user-images.githubusercontent.com/6376572/98199754-e855e280-1f66-11eb-8364-3d8e48cd7d4f.png|Screenshot_20201105-124700>

github 13:11:08

Comment on #234 Fix tutorial image order

*Pull Request Test Coverage Report for <https://coveralls.io/builds/34729643|Build 1207>* • *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 *85.94%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*

github 13:49:11

Review on #234 Fix tutorial image order

Thanks for the fix! If applicable, I suggest adding cache busting argument (like `${RUMORS_LINE_BOT_URL}/xxx.png?v=20201105`) to make sure users get the latest image after deploy.

mrorz 14:12:37
其實我沒試過我們用的那個 koa-sendfile 是否可以讓我們在檔案名稱後面加上 `?cachebust=xxx`
需要麻煩 @acerxp511 測測看惹
ichieh 17:37:58
@bil NPO HUB 11/22(日)會有周年慶的活動,他們希望 g0v 可以有個 15 分鐘的 talk (14;00 - 16:00 之間)介紹 g0v 跟 Cofacts ,最好是可以讓參與者動手試著回傳訊息給 LINEBOT 試試看,不知道那天你們有沒有空來分享~:laughing:
22喔....我來問問可不可以改行程
@chiehg0v 有比較確定安排什麼時候的15分鐘嗎
ㄊ們是預計 14:30-16:00 每半小時一個團隊,你們比較方便哪個時段?我去跟他們說說
感謝讓給我們2點半❤️
聽起來像是個大發傳單的時機 📃

2020-11-08

2020-11-09

github 01:25:05

Review on #227 index user if not existed and log last active time for user accessing apis via backend apps

Thanks for the refactor! Let's merge this. I will try deploy it to staging before wednesday, along with data migration.

mrorz 11:59:30
聽起來像是個大發傳單的時機 📃
mrorz 12:18:57
https://cofacts.g0v.tw/article/iqyc8tigxul9
內容農場影片直接從 Cofacts 網站拿內容耶 ._.
謝謝 ilya 2018 年就指給我們的路。
mrorz 12:24:10
Youtube channel: https://www.youtube.com/c/htcheng417/about

關於網址裡的 htcheng417:
https://www.bnext.com.tw/article/57114/walk-in-the-foggy-forest

數位時代

走入網路裡一整片迷霧森林,放下對立就能看見藍天|數位時代

我們在網路的平台資本主義世界裡行走、生存,往往只看到樹木,看不到森林。

mrorz 12:27:21
謝謝 ilya 2018 年就指給我們的路。
💯 2
github 13:44:18

Comment on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined

I suggest we keep `VERSION` as a variable in `tutorial.js` because • If we change image in the future, it's natural that we go to tutorial.js and make changes there • Since image updates are under source control, so should its `VERSION`. The change of image file and the change of `VERSION` variable should be updated together in a PR.

github 13:44:18

Review on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined

Thanks for adding the cache-busting mechanism! I have some suggestion regarding where we put the cache busting variable.

github 21:43:11

Review on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined

Thanks for the fix! Let's <https://github.githubassets.com/images/icons/emoji/shipit.png|:shipit:>

2020-11-10

simon261 16:35:17
@simon261 has joined the channel
Jasmine Liu 19:04:00
@jasmine.liu has joined the channel
stbb1025 20:59:55
@yutunghsiao19 figma已經更新圖片囉~另外登入選單的部分,我想一想覺得會登入的人,應該就不會想再看landing page了,所以現在改成點選登入後登入並連到個人頁,如果使用者再跳回landing page的話只要把登入的地方換成頭像即可,再點頭像也不會有選單,而是直接連到個人頁,感謝~
目前還沒有個人頁 (還在做 ><)
可以先連到 `/hoax-for-you` 唷
好~~
🙆 1
mrorz 23:59:41
chatbot flex message 的自動調整字體大小 `shrink-to-fit` 看起來會有用耶
https://speakerdeck.com/line_developers_tw/line-api-platform-update-202011?slide=20

Speaker Deck

LINE API Platform Update 202011

LINE API Platform Update 2020/11 by NiJia Lin @ Chatbot community #25 <https://chatbots.kktix.cc/events/meetup-025>

2020-11-11

mrorz 13:25:44
今日會議記錄
主要會跟 user refactor 的上線有關唷
https://g0v.hackmd.io/@mrorz/cofacts-meeting-notes/%2FkWuTnoC1TG-MONPhxp8rGQ
yiji 19:09:32
請問有沒有人知道哪裡有專門討論怎麼解決假消息或仇恨言論的「方法、試驗成果、倫理」的網站或討論群?
我看得懂中文跟英文...  謝謝。
「解決」的部分有點難耶,我覺得現在看起來滿多製造假訊息的人都是因為經濟誘因使然,而且又是跨國的所以鞭長莫及。

整理的作法裡面最多就是透過增加查核的曝光為手段來進行「減害」,其他更強制作法,就要考慮到言論自由而有所拿捏了
現在回頭看當時整裡的東西,Facebook 在 2018 年還在試著用馬尼拉中介者來規避平台查核責任,2020 年的現在卻被另一派指責說在做 sensorship。

也是此一時彼一時呢。
感謝!所以說 該用的關鍵字是 Mitigation,了解
yiji 19:16:21
推薦書或期刊也可以。

2020-11-12

2020-11-13

mrorz 01:00:10
現在開始 migration,預計一個小時
Cofacts 網站與 LINE bot 會下線唷
🙏 1
mrorz 01:39:27
data migration 完成,感謝 @zoetwca m(_ _)m
🙏 1
github 02:19:27

#354 Remove stackimpact

Stack impact was introduced to mitigate CPU issue: <https://github.com/cofacts/rumors-site/pull/189|#189> However after it's added, we did not get meaningful insight from it. On the other hand, it requires native extension when installing the project and hence stops some of our contributor in g0v hackathon from contributing. I suggest we remove stackimpact from rumors-site bundle.

mrorz 02:33:27
關於 SEO,我之前有個想法忘記在會議上提出。

大致上的概念是:既然 Google 搜尋不支援 accept-language 自動偵測,那我們一個 domain 就固定用一種語言好。

我提議我們改成
• `cofacts.org`, `cofacts.g0v.tw`, `zh.cofacts.org` 三個 domain 永遠 serve 中文版
• `en.cofacts.org` 永遠 serve 英文版
• 無論是哪個版本,都採用 google 建議,使用 `<link rel="alternate" hreflang="_lang_code_" href="_url_of_page_" />` 指向所有語言
• 在瀏覽器用 `navigator.language` 偵測瀏覽器語言,如果語言與 UI 不同,則顯示一個切換語言的 banner,顯示同一個頁面的不同語言 URL
這樣應該可以讓最長被使用的 cofacts.g0v.tw, cofacts.org 的 <html lang> 在 index 時是受眾最常用的中文,也解決中文首頁 SEO 的問題。

See: https://github.com/cofacts/rumors-site/issues/347#issuecomment-718878471

關於這個變更大家有什麼覺得不妥的嗎~

Google Developers

Tell Google about localized versions of your page

mrorz 02:40:03
關於有三個版本都 serve 中文版這件事情,中文版可能要挑一個 URL 當作 canonical URL。

https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?hl=zh-Hant&visit_id=637408030503556838-3312092471&rd=1

目前 cofacts.g0v.tw 是被 index 最多的版本,如果換 canonical url 到 cofacts.org 的話,page rank 會掉嗎?

Google Developers

Consolidate duplicate URLs  |  Google Search Central  |  Google Developers

2020-11-14

mrorz 02:32:20
我發現 Google 其實不認為只翻譯 UI 字串的網站就多語網站。

> Translating only the boilerplate text of your pages while keeping the bulk of your content in a single language (as often happens on pages featuring user-generated content) can create a bad user experience if the same content appears multiple times in search results with various boilerplate languages.
https://developers.google.com/search/docs/advanced/crawling/managing-multi-regional-sites#make-sure-the-page-language-is-obvious

那我覺得我們還是
1. 把基於 http request header 的自動語言偵測功能拿掉;en.xxx server 英文 UI,其他一律 serve 中文 UI
2. 無論哪個版本的網址,canonical 一律使用 cofacts.org/xxx 避免重複爬取
3. 除了整頁都英文的 landing page 之外,其他頁面都不下 hreflang 標籤了,就通通當中文ㄅ

Google Developers

Managing multi-regional and multilingual sites  |  Google Search Central

mrorz 12:04:44
@acerxp511 上次小聚那個訊息分配不會動
可能是因為 code 裡面用 `getSheets()[0]` 可能會抓到不是 README 的其他 sheet
image.png
今天十傑我先改用 getSheetByName 惹
但我沒動到 template~
不知道為啥 import sheet 進來卻會改到 sheet index @@
mrorz 13:20:57
十傑的高中生沒有 FB, twitter, github
有問是否可以用 google 登入(對齁沒有接 QQ
另外有問題是
API 目前 Facebook redirect 回來一律會到 cofacts.g0v.tw
所以如果從 cofacts.org 登入的話
第一次登入會遇到 session redirect 不存在的問題 @@
手機版送回應的時候沒有檢查 reference 是否存在

會送到後端然後再噴出英文的 error
哦哦哦
後來無法登入的人默默又可以ˊ登入了
原因不ㄇㄧㄥ
登入乾脆改用這個?
https://webauthn.guide/
啊,他不能跨網域
所以 api.cofacts.orgcofacts-api.g0v.tw 分開的問題還是存在囧
Google要我幫你接嗎
我自己產品上目前有接過
@lucien 好哇感謝感謝,要開張票ㄇ

我們 passport 設定在這兒
https://github.com/cofacts/rumors-api/blob/master/src/auth.js

elasticsearch mapping 在 `user` index 下可能要增加一個記 google user id 的欄位
https://github.com/cofacts/rumors-db/blob/master/schema/users.js#L21
DB我有問題再問你

2020-11-15

2020-11-16

github 14:32:52

#3 Apply data grid to thank-you editor

• Better appearance for the reply list page <https://cofacts.github.io/community-builder/#/editorworks|https://cofacts.github.io/community-builder/#/editorworks> • Add date filter <https://user-images.githubusercontent.com/108608/99219781-59738080-2818-11eb-8030-ffc33555f67e.png|image>

2020-11-17

github 12:14:53

#235 Feature/dialogflow

Fixes <https://github.com/cofacts/rumors-line-bot/issues/222|#222> dialogflow intent design <https://g0v.hackmd.io/kWuTnoC1TG-MONPhxp8rGQ#2020-Q4--2021-Q1-%E9%80%B2%E5%BA%A6%E7%A2%BA%E8%AA%8D|discussion>

關於長文章也 match 會到 dialogflow intent 的問題,還在沒空詳細研究,我這兩天要準備禮拜四的面試,所以先發 PR 了
加油加油
github 12:36:21

Comment on #235 Feature/dialogflow

*Pull Request Test Coverage Report for <https://coveralls.io/builds/35015547|Build 1216>* • *21* of *21* *(100.0%)* changed or added relevant lines in *2* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage increased (+*0.3%*) to *86.38%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*

2020-11-18

github 14:57:05

Comment on #233 ctx userId should be dbUserId

<https://coveralls.io/builds/35051417|Coverage Status> Coverage increased (+0.06%) to 86.003% when pulling *<https://github.com/cofacts/rumors-api/commit/d09fdf58809aabe60a5f86155b1c88ed3c43581b|d09fdf5> on ctxUserId* into *<https://github.com/cofacts/rumors-api/commit/2c0769ea2273fe96efee24006607e8f9bf934b95|2c0769e> on master*.

github 16:01:40

Comment on #52 add slug &amp; bio fields for user

Thanks for updating the typo! I found that the text is a bit outdated as well. Suggested change

mrorz 21:18:05
@stbb1025 請問 landing page 最上面的大圖「懷疑自己收到謠言嗎」有英文版的圖嗎 cc/@yutunghsiao19
我明天提供~
已經放上figma囉~
hsiao 21:21:18
翻譯有缺的部分
```#: components\Hyperlinks.js:115
msgid "Domain name cannot be resolved"
msgstr ""

#: components\Hyperlinks.js:118
msgid "URL is malformed or not supported"
msgstr ""

#: components\Hyperlinks.js:122
msgid "Target site contains HTTPS error"
msgstr ""

#: components\Hyperlinks.js:124
msgid "Unknown error"
msgstr ""

#: pages\article\[id].js:395
#, javascript-format
msgid "There is ${ replyCount } fact-checking reply to the message"
msgid_plural "There are ${ replyCount } fact-checking replies to the message"
msgstr[0] ""
msgstr[1] ""

#: pages\article\[id].js:409
#: pages\article\[id].js:445
msgid "Add Cofacts as friend in LINE"
msgstr ""

#: components\TrendPlot.js:128
msgid "Past 31 days"
msgstr ""

#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:132
msgid "Please provide more info"
msgstr ""

#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:198
msgid ""
"Did you find anything suspicious about the message after you search "
"Facebook & Google?"
msgstr ""

#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:210
msgid ""
"Please provide paragraphs you find controversial, or related news, image & "
"video material you have found."
msgstr ""

#: components\AppLayout\AppLayout.js:65
msgid "Your display name has been updated."
msgstr ""

#: components\AppLayout\AppLayout.js:77
msgid "Please enter new display name"
msgstr ""

#: components\AppLayout\AppLayout.js:82
msgid "Display name cannot be empty."
msgstr ""

#: components\ListPageDisplays\ArticleCard.js:115
msgctxt "Info box"
msgid "reports"
msgstr ""```
```#: components\Hyperlinks.js:115
msgid "Domain name cannot be resolved"
msgstr "找不到網域"
#: components\Hyperlinks.js:118
msgid "URL is malformed or not supported"
msgstr "不支援或錯誤的 URL"
#: components\Hyperlinks.js:122
msgid "Target site contains HTTPS error"
msgstr "目標網站有 HTTPS 錯誤"
#: components\Hyperlinks.js:124
msgid "Unknown error"
msgstr "未知錯誤"
#: pages\article\[id].js:395
#, javascript-format
msgid "There is ${ replyCount } fact-checking reply to the message"
msgid_plural "There are ${ replyCount } fact-checking replies to the message"
msgstr[0] "本訊息有 ${ replyCount } 則查核回應"

#: pages\article\[id].js:409
#: pages\article\[id].js:445
msgid "Add Cofacts as friend in LINE"
msgstr "加 LINE 查謠言"
#: components\TrendPlot.js:128
msgid "Past 31 days"
msgstr "近 31 日"
#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:132
msgid "Please provide more info"
msgstr "字數不足"
#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:198
msgid ""
"Did you find anything suspicious about the message after you search "
"Facebook & Google?"
msgstr "搜尋臉書或 Google 後,你發現了什麼可疑的地方,想給其他編輯參考呢?"
#: components\CreateReplyRequestForm\CreateReplyRequestForm.js:210
msgid ""
"Please provide paragraphs you find controversial, or related news, image & "
"video material you have found."
msgstr "請分享你覺得訊息中的爭議點或是你查核到的相關圖片、影片以及報導資訊"
#: components\AppLayout\AppLayout.js:65
msgid "Your display name has been updated."
msgstr "暱稱已更新"
#: components\AppLayout\AppLayout.js:77
msgid "Please enter new display name"
msgstr "請輸入新的暱稱"
#: components\AppLayout\AppLayout.js:82
msgid "Display name cannot be empty."
msgstr "暱稱不能是空白"
#: components\ListPageDisplays\ArticleCard.js:115
msgctxt "Info box"
msgid "reports"
msgstr "回報"```

2020-11-19

github 01:49:35

Comment on #232 [wip] user profile related api changes

<https://coveralls.io/builds/35067240|Coverage Status> Coverage increased (+0.4%) to 86.354% when pulling *<https://github.com/cofacts/rumors-api/commit/af2a790f0aff540478d4110defd2f4231fd91bd1|af2a790> on userProfile* into *<https://github.com/cofacts/rumors-api/commit/2c0769ea2273fe96efee24006607e8f9bf934b95|2c0769e> on master*.

mrorz 01:59:02
關於今天討論到小聚需要更有系統的教學這件事情
我想到的形式大概是這樣

小聚開始前,準備兩個 spreadsheet:
(a) 每人 10 篇要按讚的回過的訊息
(b) 每人 10 篇還沒回的訊息

先在 Slido 放 (a) 與 (b) 的連結。

1. 2:00 前:確保先來的人有連上網路。每個人簽到的時候取得一個號碼牌。
2. 2:00 ~ 2:20 開場:場地介紹、Slido 簡介、Cofacts 機器人系統簡介,大家自我介紹。
3. 2:20 ~ 2:40 介紹「幫回應按讚」的用途,以及怎麼做;什麼樣的回應可以按「有用」、哪些可以跳過、哪些真的母湯要按「沒用」,如何就事論事的給 feedback
4. 2:40 ~ 3:00 讓大家從 Slido 打開 spreadsheet (a)。直接點進自己號碼牌的那個 sheet (*不要再自己認領,改 tab 名字是高級操作大家做不來!*)然後幫每一篇按有用或沒用
5. 3:00 ~ 3:10 休息時間,閒聊「看到覺得最好的回應、覺得哪裡好」
6. 3:10 ~ 3:30 介紹「寫新回應」的方式,如何找全文、拆解回應、附出處等等
7. 3:30 ~ 4:30 讓大家從 Slido 打開 spreadsheet (b)。直接點進自己號碼牌的那個 sheet,先挑選「*一篇*」覺得最有興趣的回;回完之後如果行有餘力,再挑一篇。如果都覺得不想回,去「等你來答」挑,不要硬回 XDDD
8. 4:30 ~ 5:00 讓大家講感想、介紹文章列表(回家怎麼挑訊息)、RSS 功能、最後拍合照
❤️ 2