Browse Source

Review fix

tags/v1.1.0-rc1
Daniel Oaks 5 years ago
parent
commit
267c51bbbf
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      irc/client_lookup_set.go

+ 2
- 1
irc/client_lookup_set.go View File

@@ -209,11 +209,12 @@ func (clients *ClientManager) AllWithCaps(capabs ...caps.Capability) (sessions [
209 209
 
210 210
 // AllWithCapsNotify returns all clients with the given capabilities, and that support cap-notify.
211 211
 func (clients *ClientManager) AllWithCapsNotify(capabs ...caps.Capability) (sessions []*Session) {
212
+	capabs = append(capabs, caps.CapNotify)
212 213
 	clients.RLock()
213 214
 	defer clients.RUnlock()
214 215
 	for _, client := range clients.byNick {
215 216
 		for _, session := range client.Sessions() {
216
-			capabs = append(capabs, caps.CapNotify)
217
+			// cap-notify is implicit in cap version 302 and above
217 218
 			if session.capabilities.HasAll(capabs...) || 302 <= session.capVersion {
218 219
 				sessions = append(sessions, session)
219 220
 			}

Loading…
Cancel
Save