Standardize Build
Fixes gh-769
This commit is contained in:
@@ -68,10 +68,6 @@ public class UserRepositoryUserDetailsService implements UserDetailsService {
|
||||
return AuthorityUtils.createAuthorityList("ROLE_USER");
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return getUsername();
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return getEmail();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
package sample.websocket;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import java.util.Arrays;
|
||||
|
||||
import sample.data.ActiveWebSocketUser;
|
||||
import sample.data.ActiveWebSocketUserRepository;
|
||||
@@ -43,11 +42,14 @@ public class WebSocketDisconnectHandler<S>
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
Optional<ActiveWebSocketUser> user = this.repository.findOne(id);
|
||||
if (user.isPresent()) {
|
||||
this.repository.delete(id);
|
||||
this.messagingTemplate.convertAndSend("/topic/friends/signout",
|
||||
Collections.singleton(user.map(ActiveWebSocketUser::getUsername)));
|
||||
ActiveWebSocketUser user = this.repository.findOne(id);
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.repository.delete(id);
|
||||
this.messagingTemplate.convertAndSend("/topic/friends/signout",
|
||||
Arrays.asList(user.getUsername()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user