MCPcopy
hub / github.com/writefreely/writefreely / augmentContent

Method augmentContent

postrender.go:97–110  ·  view source on GitHub ↗
(c *Collection)

Source from the content-addressed store, hash-verified

95}
96
97func (p *Post) augmentContent(c *Collection) {
98 if p.PinnedPosition.Valid {
99 // Don't augment posts that are pinned
100 return
101 }
102 if strings.Index(p.Content, shortCodeNoSig) > -1 {
103 // Don't augment posts with the special "nosig" shortcode
104 return
105 }
106 // Add post signatures
107 if c.Signature != "" {
108 p.Content += "\n\n" + c.Signature
109 }
110}
111
112func (p *PublicPost) augmentContent() {
113 p.Post.augmentContent(&p.Collection.Collection)

Callers 7

GetPostsMethod · 0.95
GetPostsTaggedMethod · 0.95
GetLangPostsMethod · 0.95
GetPinnedPostsMethod · 0.95
viewCollectionPostFunction · 0.45
augmentContentMethod · 0.45
emailPostFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected