Skip to content

Commit 4f4800e

Browse files
committed
Don't request the same capability more than once in a single request
1 parent 4b26e99 commit 4f4800e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/kitteh/irc/client/library/defaults/listener/DefaultCapListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private void fireAndCapReq(@NonNull CapabilityNegotiationResponseEventWithReques
169169
List<String> requests = responseEvent.getRequests();
170170
if (!requests.isEmpty()) {
171171
CapabilityRequestCommand capabilityRequestCommand = new CapabilityRequestCommand(this.getClient());
172-
requests.forEach(capabilityRequestCommand::enable);
172+
requests.stream().distinct().forEach(capabilityRequestCommand::enable);
173173
capabilityRequestCommand.execute();
174174
}
175175
}

0 commit comments

Comments
 (0)