Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rocketchat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
packages
rocketchat
Commits
e3ee3612
Unverified
Commit
e3ee3612
authored
3 years ago
by
nd
Browse files
Options
Downloads
Patches
Plain Diff
add support for custom patches
parent
3cc4d93d
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14917
waiting for manual action
Stage: build
Stage: package
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0001-fix-email-Header-Footer-are-also-included-in-plainte.patch
+40
-0
40 additions, 0 deletions
...ix-email-Header-Footer-are-also-included-in-plainte.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
41 additions
and
0 deletions
debian/patches/0001-fix-email-Header-Footer-are-also-included-in-plainte.patch
0 → 100644
+
40
−
0
View file @
e3ee3612
From ae8f700cb41c4ec5d69b7a8f84fce455067796b9 Mon Sep 17 00:00:00 2001
From: marudor <marudor@marudor.de>
Date: Fri, 10 Dec 2021 13:58:59 +0100
Subject: [PATCH] fix(email): Header & Footer are also included in plaintext
emails
https://github.com/RocketChat/Rocket.Chat/pull/23928
---
app/mailer/server/api.ts | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/app/mailer/server/api.ts b/app/mailer/server/api.ts
index c59cd2151f..f97ce0823e 100644
--- a/app/mailer/server/api.ts
+++ b/app/mailer/server/api.ts
@@ -75,10 +75,6 @@
export const replaceEscaped = (str: string, data: { [key: string]: unknown } = {
};
export const wrap = (html: string, data: { [key: string]: unknown } = {}): string => {
- if (settings.get('email_plain_text_only')) {
- return replace(html, data);
- }
-
if (!body) {
throw new Error('`body` is not set yet');
}
@@ -190,8 +186,8 @@
export const send = ({
from,
replyTo,
subject: replace(subject, data),
- text: (text && replace(text, data))
- || (html && stripHtml(replace(html, data)).result)
+ text: (text && stripHtml(wrap(text, data)).result)
+ || (html && stripHtml(wrap(html, data)).result)
|| undefined,
html: html ? wrap(html, data) : undefined,
headers,
--
2.35.1
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
e3ee3612
0001-fix-email-Header-Footer-are-also-included-in-plainte.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment