Reshare Files on Enabling File Sharing

This commit is contained in:
Sarah Jamie Lewis 2022-07-06 12:20:50 -07:00
parent f119d316c5
commit 7e01cf4916
2 changed files with 7 additions and 2 deletions

1
go.sum
View File

@ -274,6 +274,7 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=

8
lib.go
View File

@ -415,11 +415,15 @@ func SendAppEvent(eventJson string) {
}
// File Sharing Experiment Refresh
_, err = filesharing.FunctionalityGate(settings.Experiments)
fs, err := filesharing.FunctionalityGate(settings.Experiments)
if err != nil {
for _, handle := range application.ListProfiles() {
application.GetPeer(handle).StopAllFileShares()
}
} else {
for _, handle := range application.ListProfiles() {
fs.ReShareFiles(application.GetPeer(handle))
}
}
// Explicitly toggle blocking/unblocking of unknown connections for profiles
@ -953,7 +957,7 @@ func VerifyOrResumeDownload(profileOnion string, conversationID int, fileKey str
log.Errorf("found manifest path but not download path for %s", fileKey)
}
} else {
log.Debugf("no stored manifest path found for %s", fileKey)
log.Errorf("no stored manifest path found for %s", fileKey)
}
}
}