[MM-55048] Pretty print posts, users, channels and teams in logs (#25029)

This commit is contained in:
Ben Schumacher 2023-10-23 20:22:36 +02:00 committed by GitHub
parent a78710c2a6
commit aa82597e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 0 deletions

View File

@ -82,6 +82,10 @@ func (o *Channel) Auditable() map[string]interface{} {
}
}
func (o *Channel) LogClone() any {
return o.Auditable()
}
type ChannelWithTeamData struct {
Channel
TeamDisplayName string `json:"team_display_name"`

View File

@ -146,6 +146,10 @@ func (o *Post) Auditable() map[string]interface{} {
}
}
func (o *Post) LogClone() any {
return o.Auditable()
}
type PostEphemeral struct {
UserID string `json:"user_id"`
Post *Post `json:"post"`

View File

@ -60,6 +60,10 @@ func (o *Team) Auditable() map[string]interface{} {
}
}
func (o *Team) LogClone() any {
return o.Auditable()
}
type TeamPatch struct {
DisplayName *string `json:"display_name"`
Description *string `json:"description"`

View File

@ -139,6 +139,10 @@ func (u *User) Auditable() map[string]interface{} {
}
}
func (u *User) LogClone() any {
return u.Auditable()
}
//msgp UserMap
// UserMap is a map from a userId to a user object.