Principal user = SimpMessageHeaderAccessor.getUser(headers);
if(user == null) {
return;
}
String id = SimpMessageHeaderAccessor.getSessionId(headers);
repository.save(new ActiveWebSocketUser(id, user.getName(), Calendar.getInstance()));
messagingTemplate.convertAndSend("/topic/friends/signin", Arrays.asList(user.getName()));
}