From 599991ea731953f772824ce3ed1e591246aa004f Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 22 Jan 2018 15:32:50 -0600 Subject: PLT-3383: image proxy support (#7991) * image proxy support * go vet fix, remove mistakenly added coverage file * fix test compile error * add validation to config settings and documentation to model functions * add message_source field to post --- model/post_list.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'model/post_list.go') diff --git a/model/post_list.go b/model/post_list.go index 018f7d14f..09cddfdcf 100644 --- a/model/post_list.go +++ b/model/post_list.go @@ -21,6 +21,15 @@ func NewPostList() *PostList { } } +func (o *PostList) WithRewrittenImageURLs(f func(string) string) *PostList { + copy := *o + copy.Posts = make(map[string]*Post) + for id, post := range o.Posts { + copy.Posts[id] = post.WithRewrittenImageURLs(f) + } + return © +} + func (o *PostList) StripActionIntegrations() { posts := o.Posts o.Posts = make(map[string]*Post) -- cgit v1.2.3-1-g7c22