Profile Images (+ Testing Improvements) #68
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.openprivacy.ca/cwtch.im/libcwtch-go
|
|||
go 1.15
|
||||
|
||||
require (
|
||||
cwtch.im/cwtch v0.14.18
|
||||
cwtch.im/cwtch v0.14.19
|
||||
git.openprivacy.ca/cwtch.im/server v1.4.2
|
||||
git.openprivacy.ca/openprivacy/connectivity v1.8.1
|
||||
git.openprivacy.ca/openprivacy/log v1.0.3
|
||||
|
|
4
go.sum
4
go.sum
|
@ -11,8 +11,8 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl
|
|||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cwtch.im/cwtch v0.14.9/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
||||
cwtch.im/cwtch v0.14.18 h1:xyMD4van3f7+edGuuKyuYxJETM67AvuK2tIBBXte3s0=
|
||||
cwtch.im/cwtch v0.14.18/go.mod h1:lG9e5RUib+SbX2XsjWtHKJWz9geoIglSAq55LrCm8Io=
|
||||
cwtch.im/cwtch v0.14.19 h1:Vg2OyUkSpYecrOU2M3mLF/PDyUZZSxk8HG55uimja58=
|
||||
cwtch.im/cwtch v0.14.19/go.mod h1:lG9e5RUib+SbX2XsjWtHKJWz9geoIglSAq55LrCm8Io=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
||||
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
|
||||
|
|
9
lib.go
9
lib.go
|
@ -209,11 +209,14 @@ func _startCwtch(appDir string, torPath string) {
|
|||
publishLoadedServers()
|
||||
LaunchServers()
|
||||
|
||||
// Send global settings to the UI...
|
||||
// FIXME: This code exists to allow the Splash Screen test in the new UI integration tests to pass
|
||||
// it doesn't actually fix the problem in theory, and we should get around to ensuring that application
|
||||
// is safe to access even if shutdown is called concurrently...
|
||||
if application == nil {
|
||||
log.Errorf("startCwtch: primary application object has gone away. assuming application is closing.")
|
||||
return
|
||||
}
|
||||
// Send global settings to the UI...
|
||||
application.GetPrimaryBus().Publish(event.NewEvent(utils.UpdateGlobalSettings, map[event.Field]string{event.Data: string(settingsJson)}))
|
||||
log.Infof("libcwtch-go application launched")
|
||||
application.GetPrimaryBus().Publish(event.NewEvent(utils.CwtchStarted, map[event.Field]string{}))
|
||||
|
@ -730,7 +733,7 @@ func ShareFile(profileOnion string, conversationID int, sharefilepath string) {
|
|||
if err != nil {
|
||||
log.Errorf("file sharing error: %v", err)
|
||||
} else {
|
||||
fileKey, err := fh.ShareFile(sharefilepath, profile, conversationID)
|
||||
fileKey, overlay, err := fh.ShareFile(sharefilepath, profile)
|
||||
if err != nil {
|
||||
log.Errorf("error sharing file: %v", err)
|
||||
} else if conversationID == -1 {
|
||||
|
@ -747,6 +750,8 @@ func ShareFile(profileOnion string, conversationID int, sharefilepath string) {
|
|||
event.TempFile: "",
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
profile.SendMessage(conversationID, overlay)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue