add server pub key to background process
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-29 15:59:33 +01:00
parent b15f571938
commit 729ba7e02a

View File

@ -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