Rename ClientFederationFields struct to make better sense

This commit is contained in:
Devon Hudson 2023-08-31 08:21:15 -06:00
parent 5e796e2000
commit 2c4b3e7e24
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -44,9 +44,9 @@ const (
FormatSyncFederation FormatSyncFederation
) )
// ClientFederationEvent extends a ClientEvent to contain the additional fields present in a // ClientFederationFields extends a ClientEvent to contain the additional fields present in a
// federation event. Used when the client requests `event_format` of type `federation`. // federation event. Used when the client requests `event_format` of type `federation`.
type ClientFederationEvent struct { type ClientFederationFields struct {
Depth int64 `json:"depth,omitempty"` Depth int64 `json:"depth,omitempty"`
PrevEvents []string `json:"prev_events,omitempty"` PrevEvents []string `json:"prev_events,omitempty"`
AuthEvents []string `json:"auth_events,omitempty"` AuthEvents []string `json:"auth_events,omitempty"`
@ -67,8 +67,8 @@ type ClientEvent struct {
Unsigned spec.RawJSON `json:"unsigned,omitempty"` Unsigned spec.RawJSON `json:"unsigned,omitempty"`
Redacts string `json:"redacts,omitempty"` Redacts string `json:"redacts,omitempty"`
// Federation Event Fields. Only sent to clients when `event_format` == `federation`. // Only sent to clients when `event_format` == `federation`.
ClientFederationEvent ClientFederationFields
} }
// ToClientEvents converts server events to client events. // ToClientEvents converts server events to client events.