Changeset 198 in code for trunk/user.go


Ignore:
Timestamp:
Apr 1, 2020, 10:16:32 AM (5 years ago)
Author:
contact
Message:

Auto away

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r197 r198  
    176176                switch e := e.(type) {
    177177                case eventUpstreamConnected:
    178                         // Nothing to do
     178                        uc := e.uc
     179                        uc.updateAway()
    179180                case eventUpstreamDisconnected:
    180181                        uc := e.uc
     
    201202
    202203                        u.downstreamConns = append(u.downstreamConns, dc)
     204
     205                        u.forEachUpstream(func(uc *upstreamConn) {
     206                                uc.updateAway()
     207                        })
    203208                case eventDownstreamDisconnected:
    204209                        dc := e.dc
     
    209214                                }
    210215                        }
     216
     217                        u.forEachUpstream(func(uc *upstreamConn) {
     218                                uc.updateAway()
     219                        })
    211220                case eventDownstreamMessage:
    212221                        msg, dc := e.msg, e.dc
Note: See TracChangeset for help on using the changeset viewer.