Skip to content

Commit

Permalink
[homekit] fix listUsers() method
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Cutrer <cody@cutrer.us>
  • Loading branch information
ccutrer committed Dec 19, 2022
1 parent f364444 commit 4b4f6e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ public boolean hasUser() {
@Override
public Collection<String> listUsers() {
Collection<String> keys = storage.getKeys();
return keys.stream().filter(this::isUserKey).collect(Collectors.toList());
// don't forget to strip user_ prefix
return keys.stream().filter(this::isUserKey).map(u -> u.substring(5)).collect(Collectors.toList());
}

@Override
Expand Down

0 comments on commit 4b4f6e9

Please sign in to comment.