diff --git a/app/app.go b/app/app.go index 5398518..79ff14f 100644 --- a/app/app.go +++ b/app/app.go @@ -312,10 +312,14 @@ func (app *application) installProfile(profile peer.CwtchPeer) bool { if app.peers[profile.GetOnion()] == nil { eventBus := event.NewEventManager() app.eventBuses[profile.GetOnion()] = eventBus - profile.Init(app.eventBuses[profile.GetOnion()]) app.registerHooks(profile) + profile.Init(app.eventBuses[profile.GetOnion()]) app.peers[profile.GetOnion()] = profile + // Update the Peer with the Most Recent Experiment State... + settings := app.settings.ReadGlobalSettings() + profile.UpdateExperiments(settings.ExperimentsEnabled, settings.Experiments) + app.AddPeerPlugin(profile.GetOnion(), plugins.CONNECTIONRETRY) // Now Mandatory app.appBus.Publish(event.NewEvent(event.NewPeer, map[event.Field]string{event.Identity: profile.GetOnion(), event.Created: event.False}))