mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
event: add omitempty for mod policy entity
Some checks failed
Some checks failed
Only one of hash and entity should be set
This commit is contained in:
parent
a3092e5195
commit
f5746ee0f6
1 changed files with 1 additions and 1 deletions
|
|
@ -231,7 +231,7 @@ func (ph *PolicyHashes) DecodeSHA256() *[32]byte {
|
|||
// ModPolicyContent represents the content of a m.room.rule.user, m.room.rule.room, and m.room.rule.server state event.
|
||||
// https://spec.matrix.org/v1.2/client-server-api/#moderation-policy-lists
|
||||
type ModPolicyContent struct {
|
||||
Entity string `json:"entity"`
|
||||
Entity string `json:"entity,omitempty"`
|
||||
Reason string `json:"reason"`
|
||||
Recommendation PolicyRecommendation `json:"recommendation"`
|
||||
UnstableHashes *PolicyHashes `json:"org.matrix.msc4205.hashes,omitempty"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue