about summary refs log tree commit diff stats
path: root/worker/lib
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-03-03 16:20:07 -0500
committerDrew DeVault <sir@cmpwn.com>2020-03-03 16:49:52 -0500
commitf3158b36f1f210ff54febbe82b571c1379b30c98 (patch)
tree10cde839c9517609f55b8f1057b1cf84ac592632 /worker/lib
parent89f1684ea4b5e680db7ff06a54b2d4e78212cd12 (diff)
downloadaerc-f3158b36f1f210ff54febbe82b571c1379b30c98.tar.gz
Initial support for PGP decryption & signatures
Diffstat (limited to 'worker/lib')
-rw-r--r--worker/lib/parse.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index fd744a7..ac20ac8 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -57,7 +57,7 @@ func splitMIME(m string) (string, string) {
 	return parts[0], parts[1]
 }
 
-func parseEntityStructure(e *message.Entity) (*models.BodyStructure, error) {
+func ParseEntityStructure(e *message.Entity) (*models.BodyStructure, error) {
 	var body models.BodyStructure
 	contentType, ctParams, err := e.Header.ContentType()
 	if err != nil {
@@ -86,7 +86,7 @@ func parseEntityStructure(e *message.Entity) (*models.BodyStructure, error) {
 			} else if err != nil {
 				return nil, err
 			}
-			ps, err := parseEntityStructure(part)
+			ps, err := ParseEntityStructure(part)
 			if err != nil {
 				return nil, fmt.Errorf("could not parse child entity structure: %v", err)
 			}
@@ -189,7 +189,7 @@ func MessageInfo(raw RawMessage) (*models.MessageInfo, error) {
 	if err != nil {
 		return nil, fmt.Errorf("could not read message: %v", err)
 	}
-	bs, err := parseEntityStructure(msg)
+	bs, err := ParseEntityStructure(msg)
 	if err != nil {
 		return nil, fmt.Errorf("could not get structure: %v", err)
 	}