This common logic has been exctracted to lib, because I need to use this in yet another place
More context on this part of code: [[ https://linear.app/comm/issue/ENG-1707/revert-fix-getting-the-keyserver-admin-info | ENG-1707 ]]
Related issue: [[ https://linear.app/comm/issue/ENG-1700/create-endpoint-responder-for-message-report | ENG-1700 ]]