Don't send empty leaseSeconds

This commit is contained in:
Peter Stuifzand 2018-01-31 14:30:50 +01:00
parent 0bfcd8706f
commit 7da531130a

View File

@ -157,7 +157,9 @@ func (handler *subscriptionHandler) handleSubscription(w http.ResponseWriter, r
q.Add("hub.mode", "subscribe")
q.Add("hub.topic", topicURL.String())
q.Add("hub.challenge", ourChallenge)
q.Add("hub.lease_seconds", leaseSecondsStr)
if leaseSecondsStr != "" {
q.Add("hub.lease_seconds", leaseSecondsStr)
}
validationURL.RawQuery = q.Encode()
log.Printf("subscribe: async validation with url %s\n", validationURL.String())