diff --git a/app/tui/main.go b/app/tui/main.go index abb9b8b..1f5a953 100644 --- a/app/tui/main.go +++ b/app/tui/main.go @@ -1,14 +1,14 @@ package main import ( - "fmt" - "log" - "time" "cwtch.im/cwtch/peer" + "fmt" "github.com/marcusolsson/tui-go" "io/ioutil" + "log" "os" "strings" + "time" ) func main() { diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 6b5f888..700b013 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -91,7 +91,7 @@ func (cp *CwtchPeer) ImportGroup(exportedInvite string) (groupID string, err err if err == nil { edpk := ed25519.PublicKey(pk) onion := exportedInvite[5:21] - cp.Profile.AddContact(onion, &model.PublicProfile{Name:"", Ed25519PublicKey: edpk, Trusted: true, Blocked: false, Onion: onion}) + cp.Profile.AddContact(onion, &model.PublicProfile{Name: "", Ed25519PublicKey: edpk, Trusted: true, Blocked: false, Onion: onion}) cp.Profile.ProcessInvite(cpp.GetGroupChatInvite(), onion) return cpp.GroupChatInvite.GetGroupName(), nil } diff --git a/server/app/main.go b/server/app/main.go index 4f5fac8..f632155 100644 --- a/server/app/main.go +++ b/server/app/main.go @@ -31,4 +31,4 @@ func main() { // TODO load params from .cwtch/server.conf or command line flag server.Run(serverConfig) -} \ No newline at end of file +} diff --git a/server/server.go b/server/server.go index d607a91..225c403 100644 --- a/server/server.go +++ b/server/server.go @@ -12,7 +12,7 @@ import ( // Server encapsulates a complete, compliant Cwtch server. type Server struct { - app *application.RicochetApplication + app *application.RicochetApplication config *Config } diff --git a/server/serverConfig.go b/server/serverConfig.go index 752caa1..acbf619 100644 --- a/server/serverConfig.go +++ b/server/serverConfig.go @@ -1,18 +1,18 @@ package server import ( - "sync" + "crypto/rsa" + "encoding/json" "github.com/s-rah/go-ricochet/utils" "io/ioutil" "log" - "encoding/json" - "crypto/rsa" + "sync" ) // Reporting is a struct for storing a the config a server needs to be a peer, and connect to a group to report type Reporting struct { PeerPrivateKey string `json:"privateKey"` - ReportingGroupID string `json:"reportingGroupId"` + ReportingGroupID string `json:"reportingGroupId"` ReportingServerAddr string `json:"reportingServerAddr"` } diff --git a/testing/cwtch_peer_server_intergration_test.go b/testing/cwtch_peer_server_intergration_test.go index e9719f4..577a817 100644 --- a/testing/cwtch_peer_server_intergration_test.go +++ b/testing/cwtch_peer_server_intergration_test.go @@ -129,7 +129,7 @@ func TestCwtchPeerIntegration(t *testing.T) { serverAddr, _ = utils.GetOnionAddress(serverKey) server = new(cwtchserver.Server) fmt.Println("Starting cwtch server...") - config := cwtchserver.Config{ PrivateKeyBytes: utils.PrivateKeyToString(serverKey), MaxBufferLines: 100, ServerReporting: cwtchserver.Reporting{ } } + config := cwtchserver.Config{PrivateKeyBytes: utils.PrivateKeyToString(serverKey), MaxBufferLines: 100, ServerReporting: cwtchserver.Reporting{}} go server.Run(&config) // let tor get established