Skip to content

Commit

Permalink
Merge pull request #177 from michalkurzeja/optional-federation-upstre…
Browse files Browse the repository at this point in the history
…am-parameters

Optional parameters of FederationDefinition are now marked with `omitempty` to prevent zero values from being sent to the API.
  • Loading branch information
michaelklishin authored Mar 5, 2021
2 parents 22409a2 + 59d23c7 commit e2048f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ type FederationDefinition struct {
Uri string `json:"uri"`
Expires int `json:"expires,omitempty"`
MessageTTL int32 `json:"message-ttl"`
MaxHops int `json:"max-hops"`
PrefetchCount int `json:"prefetch-count"`
MaxHops int `json:"max-hops,omitempty"`
PrefetchCount int `json:"prefetch-count,omitempty"`
ReconnectDelay int `json:"reconnect-delay"`
AckMode string `json:"ack-mode,omitempty"`
TrustUserId bool `json:"trust-user-id"`
Exchange string `json:"exchange"`
Queue string `json:"queue"`
Exchange string `json:"exchange,omitempty"`
Queue string `json:"queue,omitempty"`
}

// FederationUpstream represents a configured federation upstream.
Expand Down

0 comments on commit e2048f4

Please sign in to comment.