mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 11:48:16 +00:00
fixing command alternatives being required
fixing filename for export emote stats fixing reaction report message update
This commit is contained in:
@@ -7,10 +7,9 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface ReactionReportRepository extends JpaRepository<ReactionReport, Long> {
|
||||
|
||||
List<ReactionReport> findByReportedUserAndCreatedLessThan(AUserInAServer aUserInAServer, Instant maxCreated);
|
||||
List<ReactionReport> findByReportedUserAndCreatedGreaterThan(AUserInAServer aUserInAServer, Instant maxCreated);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ReactionReportManagementServiceBean implements ReactionReportManage
|
||||
@Override
|
||||
public Optional<ReactionReport> findRecentReactionReportAboutUser(AUserInAServer aUserInAServer, Duration maxAge) {
|
||||
Instant maxCreation = Instant.now().minus(maxAge);
|
||||
List<ReactionReport> foundReports = repository.findByReportedUserAndCreatedLessThan(aUserInAServer, maxCreation);
|
||||
List<ReactionReport> foundReports = repository.findByReportedUserAndCreatedGreaterThan(aUserInAServer, maxCreation);
|
||||
return foundReports.isEmpty() ? Optional.empty() : Optional.of(foundReports.get(0));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user