Optimistically Sync Servers on Import Bundle
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
a98b5deb02
commit
ed868c140b
6
lib.go
6
lib.go
|
@ -630,6 +630,12 @@ func ImportBundle(profileOnion string, bundle string) {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
response = groupHandler.HandleImportString(profile, bundle)
|
response = groupHandler.HandleImportString(profile, bundle)
|
||||||
eventHandler.Push(event.NewEvent(event.AppError, map[event.Field]string{event.Data: response.Error()}))
|
eventHandler.Push(event.NewEvent(event.AppError, map[event.Field]string{event.Data: response.Error()}))
|
||||||
|
|
||||||
|
// We might have added a new server, so refresh the server list...
|
||||||
|
serverListForOnion := groupHandler.GetServerInfoList(profile)
|
||||||
|
serversListBytes, _ := json.Marshal(serverListForOnion)
|
||||||
|
eventHandler.Push(event.NewEvent(groups.UpdateServerInfo, map[event.Field]string{"ProfileOnion": profileOnion, groups.ServerList: string(serversListBytes)}))
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eventHandler.Push(event.NewEvent(event.AppError, map[event.Field]string{event.Data: response.Error()}))
|
eventHandler.Push(event.NewEvent(event.AppError, map[event.Field]string{event.Data: response.Error()}))
|
||||||
|
|
Loading…
Reference in New Issue