[MM-55048] Pretty print posts, users, channels and teams in logs (#25029)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a78710c2a6
Коммит
aa82597e2d
@@ -82,6 +82,10 @@ func (o *Channel) Auditable() map[string]interface{} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *Channel) LogClone() any {
|
||||||
|
return o.Auditable()
|
||||||
|
}
|
||||||
|
|
||||||
type ChannelWithTeamData struct {
|
type ChannelWithTeamData struct {
|
||||||
Channel
|
Channel
|
||||||
TeamDisplayName string `json:"team_display_name"`
|
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 {
|
type PostEphemeral struct {
|
||||||
UserID string `json:"user_id"`
|
UserID string `json:"user_id"`
|
||||||
Post *Post `json:"post"`
|
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 {
|
type TeamPatch struct {
|
||||||
DisplayName *string `json:"display_name"`
|
DisplayName *string `json:"display_name"`
|
||||||
Description *string `json:"description"`
|
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
|
//msgp UserMap
|
||||||
|
|
||||||
// UserMap is a map from a userId to a user object.
|
// UserMap is a map from a userId to a user object.
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user