Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/app/notify/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (e *Email) buildAndSendMessage(ctx context.Context, req Request, email stri
ctx,
fmt.Sprintf("mailto:%s?from=%s&unsubscribeLink=%s&subject=%s",
email,
e.From,
url.QueryEscape(e.From),
url.QueryEscape(msg.unsubscribeLink),
url.QueryEscape(msg.subject),
),
Expand Down Expand Up @@ -203,7 +203,7 @@ func (e *Email) SendVerification(ctx context.Context, req VerificationRequest) e
ctx,
fmt.Sprintf("mailto:%s?from=%s&subject=%s",
req.Email,
e.From,
url.QueryEscape(e.From),
url.QueryEscape(e.VerificationSubject),
),
msg,
Expand Down
6 changes: 6 additions & 0 deletions backend/app/store/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ func (s *Service) ExtractNonProxiedPictures(commentHTML string) (ids []string) {

// Cleanup runs periodic cleanup with 1.5*ServiceParams.EditDuration. Blocking loop, should be called inside of goroutine by consumer
func (s *Service) Cleanup(ctx context.Context) {
if s.EditDuration <= 0 {
log.Printf("[INFO] pictures cleanup disabled, edit duration is %v", s.EditDuration)
<-ctx.Done()
return
}

cleanupTTL := s.EditDuration * 15 / 10 // cleanup images older than 1.5 * EditDuration
log.Printf("[INFO] start pictures cleanup, staging ttl=%v", cleanupTTL)

Expand Down
6 changes: 3 additions & 3 deletions frontend/apps/remark42/templates/demo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
</p>
<div class="widgets">
<div class="widget widgets__widget widgets__comments-widget">
<a class="widget__link" href="/web/last-comments.html">Last comments widget page</a><br />
<iframe class="widget__frame widget__comments-frame" src="/web/last-comments.html" frameborder="0"></iframe>
<a class="widget__link" href="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/last-comments.html">Last comments widget page</a><br />
<iframe class="widget__frame widget__comments-frame" src="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/last-comments.html" frameborder="0"></iframe>
</div>
<div class="widget widgets__widget widgets__counter-widget">
<a class="widget__link" href="/web/counter.html">Counter widget page</a><br />
<a class="widget__link" href="<%= htmlWebpackPlugin.options.REMARK_URL %>/web/counter.html">Counter widget page</a><br />
<div class="widget__frame widget__counter-frame">Comments count: <span class="remark42__counter"></span></div>
</div>
</div>
Expand Down