@ -48,11 +48,6 @@ public class WebAccessAspect {
}
@Before("@annotation(app.annotations.interfaces.CheckWebAccess) && args(session)")
public void beforeWS(JoinPoint joinPoint, WebSocketSession session) throws IOException {
before(joinPoint, session);
@Before("@annotation(app.annotations.interfaces.CheckWebAccess) && args(session,..)")
public void before(JoinPoint joinPoint, WebSocketSession session) throws IOException {
AuthMethod auth_method = ((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(CheckWebAccess.class).auth_method();
@ -67,6 +67,7 @@ public class DiscordAuthService {
return jdbcTemplate.query("select account_id from user_messages where extract(epoch from now()) - utime < 300 and message like ? order by id asc limit 1",
new Object[]{uuid.toString()}, (rs, n) -> rs.getLong("account_id"))
.stream()
.map("[U:1:%s]"::formatted)
.map(SteamIDConverter::getSteamID)
.findFirst().orElse(null);