Fix mismatched receiver name on method PostMetadata.Auditable (#23904)

Этот коммит содержится в:
Doug Lauder
2023-06-28 15:31:51 -04:00
коммит произвёл GitHub
родитель 3d7af2fb55
Коммит 9d6d8cceec

Просмотреть файл

@@ -30,9 +30,9 @@ type PostMetadata struct {
Acknowledgements []*PostAcknowledgement `json:"acknowledgements,omitempty"` Acknowledgements []*PostAcknowledgement `json:"acknowledgements,omitempty"`
} }
func (pm *PostMetadata) Auditable() map[string]any { func (p *PostMetadata) Auditable() map[string]any {
embeds := make([]map[string]any, 0, len(pm.Embeds)) embeds := make([]map[string]any, 0, len(p.Embeds))
for _, pe := range pm.Embeds { for _, pe := range p.Embeds {
embeds = append(embeds, pe.Auditable()) embeds = append(embeds, pe.Auditable())
} }
if len(embeds) == 0 { if len(embeds) == 0 {
@@ -41,12 +41,12 @@ func (pm *PostMetadata) Auditable() map[string]any {
return map[string]any{ return map[string]any{
"embeds": embeds, "embeds": embeds,
"emojis": pm.Emojis, "emojis": p.Emojis,
"files": pm.Files, "files": p.Files,
"images": pm.Images, "images": p.Images,
"reactions": pm.Reactions, "reactions": p.Reactions,
"priority": pm.Priority, "priority": p.Priority,
"acknowledgements": pm.Acknowledgements, "acknowledgements": p.Acknowledgements,
} }
} }