Changeset 583 in code for trunk/user.go


Ignore:
Timestamp:
Sep 13, 2021, 8:33:46 AM (4 years ago)
Author:
contact
Message:

Don't send network notification when removed

Closes: https://todo.sr.ht/~emersion/soju/123

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r572 r583  
    675675                dc.updateSupportedCaps()
    676676        })
     677
     678        // If the network has been removed, don't send a state change notification
     679        found := false
     680        for _, net := range u.networks {
     681                if net == uc.network {
     682                        found = true
     683                        break
     684                }
     685        }
     686        if !found {
     687                return
     688        }
     689
    677690        u.forEachDownstream(func(dc *downstreamConn) {
    678691                if dc.caps["soju.im/bouncer-networks-notify"] {
Note: See TracChangeset for help on using the changeset viewer.