*Changes* • Implement contributors function which compare and update article.contributors since last snapshot • Upgrade hocuspocus/server to 2.7.1 • ref: <https://github.com/cofacts/collab-server/pull/6|#6> *Migrate* 1. Make sure reindexed the articles using `npm run reload -- articles` in <https://github.com/cofacts/rumors-db/pull/67|rumors-db> 2. Pre-fill `usersMap` with data: const usersMap = new Map(<https://g0v.hackmd.io/@ZENl3iLKTLaoUuoGPATdbg/HkxTGBgJC|data>) 3. (optional) Start ssh port forwarding `ssh -L 62222:<http://staging.server.path.to:62222|staging.server.path.to:62222> <mailto:root@staging.server.path.to|root@staging.server.path.to>` 4. Run `npx ts-node --esm ./migration/addContributors.ts` • use nodejs 16 or older version of nodejs18 It should output with 9 error articleId including • 4 are empty transcripts • 5 are transcripts that have some unknown user, articleIds are `svXFoosBAjOeMOklEKR3`, `YGoVfIgBvEj1WkaUtc9M`, `CvSJAIsBAjOeMOklKu45`, `Dvfubo0BAjOeMOklG9PK`, `c_YhOowBAjOeMOklCFve` *Verify result* Elasticsearch query ``` # Can change `must` to `must_not` to check articles that have no contributors. GET /articles/doc/_search { "size":20, "sort" : [ { "updatedAt" : "desc" } ], "query": { "bool": { "must": [ { "nested": { "path": "contributors", "query": { "exists": { "field": "contributors.appId" } } } } ] } } } ``` Or use <https://github.com/cofacts/rumors-api/pull/335|graphql api> to get articles contributed by specific user.
HackMD
# Cofacts 會議記錄 - [搜尋](<https://cse.google.com/cse?cx=71f4f7ee215d54fe6>)[target=_blank] ## 2024 -
HackMD
# Cofacts 會議記錄 - [搜尋](<https://cse.google.com/cse?cx=71f4f7ee215d54fe6>)[target=_blank] ## 2024 -
HackMD
# Cofacts 會議記錄 - [搜尋](<https://cse.google.com/cse?cx=71f4f7ee215d54fe6>)[target=_blank] ## 2024 -
HackMD
# Cofacts 會議記錄 - [搜尋](<https://cse.google.com/cse?cx=71f4f7ee215d54fe6>)[target=_blank] ## 2024 -