Skip to content

Commit

Permalink
Merge branch 'release/0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Jul 12, 2018
2 parents 73b3af8 + a002634 commit f08f5b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.faforever</groupId>
<artifactId>faf-moderator-client</artifactId>
<version>0.4.0</version>
<version>0.4.1</version>
<packaging>jar</packaging>

<name>faf-moderator-client</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ public List<Avatar> findAvatarsByTooltip(@NotNull String pattern) {

public List<Avatar> findAvatarsByAssignedUser(@NotNull String pattern) {
log.debug("Searching for avatars by assigned player with pattern: {}", pattern);
boolean isNumeric = pattern.matches("^[0-9]+$");

ElideRouteBuilder<Avatar> routeBuilder = ElideRouteBuilder.of(Avatar.class)
.addInclude("assignments")
.addInclude("assignments.player")
.filter(ElideRouteBuilder.qBuilder().string("assignments.player.id").eq(pattern)
.or().string("assignments.player.login").eq(pattern));
.filter(ElideRouteBuilder.qBuilder().string(isNumeric ? "assignments.player.id" : "assignments.player.login").eq(pattern));

List<Avatar> result = fafApi.getAll(routeBuilder);
log.trace("found {} avatars", result.size());
Expand Down

0 comments on commit f08f5b9

Please sign in to comment.