diff --git a/client/helpers/backgroundHelper.go b/client/helpers/backgroundHelper.go index 2512737..935a8c4 100644 --- a/client/helpers/backgroundHelper.go +++ b/client/helpers/backgroundHelper.go @@ -53,8 +53,15 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string //cr.LookupSignature = crl = append(crl, &cr) } + // get server public key + if job.Server.PublicKey == "" { + key, err := meowlib.HttpGetId(job.Server.Url) + if err != nil { + return -1, "CheckMessages: HttpGetId", err + } + job.Server.PublicKey = key["publicKey"] + } // build server message - var toSrv meowlib.ToServerMessage toSrv.PullRequest = crl toSrv.From = job.Server.UserKp.Public