mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-55048] Pretty print posts, users, channels and teams in logs (#25029)
This commit is contained in:
parent
a78710c2a6
commit
aa82597e2d
@ -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"`
|
||||
|
@ -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"`
|
||||
|
@ -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"`
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user