forked from cwtch.im/cwtch
PublishServerUpdate error
This commit is contained in:
parent
7a962359b3
commit
c0bc3b0803
|
@ -415,10 +415,11 @@ func (app *application) ConfigureConnections(onion string, listen bool, peers bo
|
|||
profile.Listen()
|
||||
}
|
||||
|
||||
|
||||
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.ResumeRetries))
|
||||
// do this in the background, for large contact lists it can take a long time...
|
||||
go profile.StartConnections(peers, servers)
|
||||
} else {
|
||||
log.Errorf("profile does not exist %v", onion)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,10 +87,11 @@ type Server struct {
|
|||
}
|
||||
|
||||
// PublishServerUpdate serializes the current list of group servers and publishes an event with this information
|
||||
func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer) {
|
||||
func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer) error {
|
||||
serverListForOnion := f.GetServerInfoList(profile)
|
||||
serversListBytes, _ := json.Marshal(serverListForOnion)
|
||||
serversListBytes, err := json.Marshal(serverListForOnion)
|
||||
profile.PublishEvent(event.NewEvent(UpdateServerInfo, map[event.Field]string{"ProfileOnion": profile.GetOnion(), ServerList: string(serversListBytes)}))
|
||||
return err
|
||||
}
|
||||
|
||||
// GetServerInfoList compiles all the information the UI might need regarding all servers..
|
||||
|
|
Loading…
Reference in New Issue