Initial Commit of Ephemeral Message Support for System Admins (#8611)
Fixed Permission Test Fixed and extended ephemeral message tests; Removed Online/Activity Updates Set Create Time to current time gofmt
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3a4c7603b3
Коммит
997df03ac1
@@ -80,6 +80,11 @@ type Post struct {
|
||||
HasReactions bool `json:"has_reactions,omitempty"`
|
||||
}
|
||||
|
||||
type PostEphemeral struct {
|
||||
UserID string `json:"user_id"`
|
||||
Post *Post `json:"post"`
|
||||
}
|
||||
|
||||
type PostPatch struct {
|
||||
IsPinned *bool `json:"is_pinned"`
|
||||
Message *string `json:"message"`
|
||||
@@ -432,6 +437,11 @@ func (o *Post) WithRewrittenImageURLs(f func(string) string) *Post {
|
||||
return ©
|
||||
}
|
||||
|
||||
func (o *PostEphemeral) ToUnsanitizedJson() string {
|
||||
b, _ := json.Marshal(o)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// RewriteImageURLs takes a message and returns a copy that has all of the image URLs replaced
|
||||
// according to the function f. For each image URL, f will be invoked, and the resulting markdown
|
||||
// will contain the URL returned by that invocation instead.
|
||||
|
||||
Ссылка в новой задаче
Block a user