gmail-inbox
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -17,12 +17,14 @@ "use strict"; | ||
var getMessageBody = function (message) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
var body; | ||
if ((_b = (_a = message.data.payload) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.size) { | ||
switch (message.data.payload.mimeType) { | ||
var messagePayload = message.data.payload; | ||
var messageBody = (_a = messagePayload) === null || _a === void 0 ? void 0 : _a.body; | ||
if (((_b = messageBody) === null || _b === void 0 ? void 0 : _b.size) && messagePayload) { | ||
switch ((_c = messagePayload) === null || _c === void 0 ? void 0 : _c.mimeType) { | ||
case 'text/html': | ||
body.html = Buffer.from(body.data, 'base64').toString('utf8'); | ||
body.html = Buffer.from(messageBody.data, 'base64').toString('utf8'); | ||
break; | ||
case 'text/plain': | ||
default: | ||
body.text = Buffer.from(body.data, 'base64').toString('utf8'); | ||
body.text = Buffer.from(messageBody.data, 'base64').toString('utf8'); | ||
break; | ||
@@ -29,0 +31,0 @@ } |
{ | ||
"name": "gmail-inbox", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Receive Gmail emails in code!", | ||
@@ -5,0 +5,0 @@ "main": "lib/Inbox.js", |
# Gmail-inbox | ||
Gmail-inbox is a simplified gmail API to receive emails in coding. It helps with end-to-end testing your signup process, test email functionality and automate processes that require gmail. | ||
Gmail-inbox is a simplified gmail API to receive emails in coding. It helps with end-to-end testing your signup process, test email functionality and automate processes that require receiving emails. | ||
@@ -55,2 +55,4 @@ ### Installation | ||
Note: The authorization token will only be valid for 6 months, after 6 months a renewal is required. | ||
**Step 5** | ||
@@ -57,0 +59,0 @@ Done! You're good to go, you should be able to see your inbox messages, enjoy coding! :) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36664
722
66