HomePhabricator
Diffusion Comm 8602a0a39b8f

[keyserver] Prefetch URL facts in scripts

Description

[keyserver] Prefetch URL facts in scripts

Summary:
make-channel-private.js was crashing because updateThread calls fetchServerThreadInfos, which ends up calling getUploadURL for thread avatars (recent change).

getUploadURL needs to know the URL facts to construct the URL. I can pass those in via envvar when invoking the script, but I need this change in order for the URL facts to be loaded.

Test Plan:
On my keyserver:

# enter Docker container for Node.js
docker exec -it ba4b6d866573 /bin/bash
# run the make-channel-private.js script, while passing in the URL facts as an envvar
COMM_JSONCONFIG_facts_commapp_url='{"baseDomain":"https://web.comm.app","basePath":"/","https":true,"baseRoutePath":"/commweb/","proxy":"apache"}' yarn script dist/scripts/make-channel-private.js

Reviewers: ginsu, atul

Reviewed By: ginsu

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8696

Details

Provenance
ashoatAuthored on Aug 1 2023, 6:40 AM
Reviewer
ginsu
Differential Revision
D8696: [keyserver] Prefetch URL facts in scripts
Parents
rCOMMc700760617fd: [native] Retry feature flags call
Branches
Unknown
Tags
Unknown