Changeset 451 in code for trunk/user.go


Ignore:
Timestamp:
Feb 10, 2021, 10:31:34 AM (4 years ago)
Author:
contact
Message:

Rename network.history to network.delivered

"History" is over-loaded with e.g. CHATHISTORY support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user.go

    r450 r451  
    5656type eventStop struct{}
    5757
    58 type networkHistory struct {
    59         clients map[string]string // indexed by client name
    60 }
    61 
    6258type network struct {
    6359        Network
     
    6763        conn           *upstreamConn
    6864        channels       map[string]*Channel
    69         history        map[string]*networkHistory // indexed by entity
    70         offlineClients map[string]struct{}        // indexed by client name
     65        delivered      map[string]map[string]string // entity -> client name -> msg ID
     66        offlineClients map[string]struct{}          // indexed by client name
    7167        lastError      error
    7268}
     
    8480                stopped:        make(chan struct{}),
    8581                channels:       m,
    86                 history:        make(map[string]*networkHistory),
     82                delivered:      make(map[string]map[string]string),
    8783                offlineClients: make(map[string]struct{}),
    8884        }
     
    231227                }
    232228
    233                 if net.history[ch.Name] != nil {
     229                if _, ok := net.delivered[ch.Name]; ok {
    234230                        dc.sendNetworkBacklog(net)
    235231                }
Note: See TracChangeset for help on using the changeset viewer.