aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-10-23 15:32:59 -0400
committerDrew DeVault <sir@cmpwn.com>2020-10-23 15:32:59 -0400
commit3db443c1df77804270f86e9e2afe92da52314685 (patch)
treeb811ec7e79e95315fad02cc113bc975473a67dac /plugins/base
parentbd91b3eacfb635004a31d2e62ef501441da126f3 (diff)
downloadalps-3db443c1df77804270f86e9e2afe92da52314685.tar.gz
alps-3db443c1df77804270f86e9e2afe92da52314685.zip
message.html: add tab to view raw email
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/routes.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go
index 7ba6253..0277174 100644
--- a/plugins/base/routes.go
+++ b/plugins/base/routes.go
@@ -334,7 +334,11 @@ func handleGetPart(ctx *alps.Context, raw bool) error {
return fmt.Errorf("failed to parse part Content-Type: %v", err)
}
if len(partPath) == 0 {
- mimeType = "message/rfc822"
+ if ctx.QueryParam("plain") == "1" {
+ mimeType = "text/plain"
+ } else {
+ mimeType = "message/rfc822"
+ }
}
if raw {