FRIEND_TRUST trust = null;
if(trustS != null && !trustS.equals(""))
trust = FRIEND_TRUST.valueOf(trustS);
String visibilityS = request.getPartAsStringFailsafe("visibility", 10);
FRIEND_VISIBILITY visibility = null;
if(visibilityS != null && !visibilityS.equals(""))
visibility = FRIEND_VISIBILITY.valueOf(visibilityS);
if(trust == null && !isOpennet()) {
// FIXME: Layering violation. Ideally DarknetPeerNode would do this check.