|
@@ -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
|
}
|