Skip to content

Commit

Permalink
Fix ConnectionHandler check.
Browse files Browse the repository at this point in the history
Comparing an Optional to a Connection doesn't really work.
  • Loading branch information
csmith committed Feb 26, 2016
1 parent ce7e2a3 commit edd1be2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void handleWhoInterval(final int value) {
@VisibleForTesting
@Handler
void handleAwayEvent(final ChannelUserAwayEvent event) {
if (event.getChannel().getConnection().equals(connection)
if (event.getChannel().getConnection().equals(Optional.of(connection))
&& !event.getReason().isPresent()) {
event.setDisplayProperty(DisplayProperty.DO_NOT_DISPLAY, true);
final boolean notseen = !users.containsKey(event.getUser().getNickname());
Expand Down

0 comments on commit edd1be2

Please sign in to comment.