- Sone currentSone = getCurrentSone(request.getToadletContext());
- if (currentSone == null) {
- return createErrorJsonObject("auth-required");
- }
- currentSone.addFriend(soneId);
- webInterface.getCore().touchConfiguration();
+ Sone currentSone = getCurrentSone(request.getToadletContext()).get();
+ webInterface.getCore().followSone(currentSone, soneId);
+ webInterface.getCore().markSoneKnown(sone.get());