Browse Source

Fix ConnectionHandler check.

Comparing an Optional to a Connection doesn't really work.
pull/468/head
Chris Smith 8 years ago
parent
commit
edd1be2f96

+ 1
- 1
channelwho/src/com/dmdirc/addons/channelwho/ConnectionHandler.java View File

107
     @VisibleForTesting
107
     @VisibleForTesting
108
     @Handler
108
     @Handler
109
     void handleAwayEvent(final ChannelUserAwayEvent event) {
109
     void handleAwayEvent(final ChannelUserAwayEvent event) {
110
-        if (event.getChannel().getConnection().equals(connection)
110
+        if (event.getChannel().getConnection().equals(Optional.of(connection))
111
                 && !event.getReason().isPresent()) {
111
                 && !event.getReason().isPresent()) {
112
             event.setDisplayProperty(DisplayProperty.DO_NOT_DISPLAY, true);
112
             event.setDisplayProperty(DisplayProperty.DO_NOT_DISPLAY, true);
113
             final boolean notseen = !users.containsKey(event.getUser().getNickname());
113
             final boolean notseen = !users.containsKey(event.getUser().getNickname());

Loading…
Cancel
Save