HomePhabricator
Diffusion Comm a404cfdd6f73

[keyserver] Add a function for fetching the keyserver admins ID

Description

[keyserver] Add a function for fetching the keyserver admins ID

Summary:
A function for fetching the keyserver admins ID, similarly to D4958 - assuming there is only one community and it's admin is the keyservers admin. This will be added to ENG-1707 hack.
This function is needed in message-report creator. The function from D4958 will not be used there as it would be much slower. The function from this diff will not be used where the function from D4958 is
used, because it's used on native and web so we cannot call the database there.

Test Plan:
Add the following line to the textMessageCreationResponder from keyserver/src/responders/message-responders.js:

console.log(await fetchKeyserverAdminID());

And see that when a user sends a text message (if you have just one admin in your setup) ashoat users's id (256) is logged to console.

Reviewers: tomek, atul, abosh, ashoat

Reviewed By: tomek, ashoat

Subscribers: ashoat

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

Details