Make body function work with all tests
This commit is contained in:
parent
29d579b8ac
commit
ee767d8067
@ -8,13 +8,16 @@ function match(message, headers) {
|
||||
}
|
||||
|
||||
function body(message) {
|
||||
if (message["body"][0]["content-type"] === "text/plain") {
|
||||
return message["body"][0]["content"];
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (message["body"][0]["content-type"] === "multipart/signed") {
|
||||
return message["body"][0]["content"][0]["content"];
|
||||
if (message["body"] !== undefined) {
|
||||
if (message["body"][0]["content-type"] === "text/plain") {
|
||||
return message["body"][0]["content"];
|
||||
}
|
||||
/* istanbul ignore else */
|
||||
if (message["body"][0]["content-type"] === "multipart/signed") {
|
||||
return message["body"][0]["content"][0]["content"];
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function string(message) {
|
||||
|
Loading…
Reference in New Issue
Block a user