File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -254,18 +254,17 @@ async function saveMail(settings: ObsGMailSettings, id: string) {
254254 const parts : MessagePart [ ] = payload . parts ? payload . parts : [ payload ] ;
255255 flatten_parts ( mailboxObject , parts ) ;
256256 if ( ! mailboxObject . raw_mhtml && ! mailboxObject . raw_mtxt ) {
257- let bodyText = "" ;
258257 const htmlAsset = mailboxObject . assets . find (
259258 ( asset ) =>
260259 asset . mimeType == "text/html" || asset . mimeType == "text/plain" ,
261260 ) ;
262- if ( htmlAsset && htmlAsset . body ?. data ) {
263- bodyText = htmlAsset . body . data ;
261+ if ( htmlAsset && htmlAsset . body ) {
262+ mailboxObject . raw_mhtml = htmlAsset . body ;
263+ mailboxObject . raw_mtxt = htmlAsset . body ;
264264 } else {
265265 console . warn ( "no body found" ) ;
266266 }
267- mailboxObject . mhtml = bodyText ;
268- mailboxObject . mtxt = bodyText ;
267+
269268 }
270269 console . log ( "mailboxObject:" ) ;
271270 console . log ( payload ) ;
You can’t perform that action at this time.
0 commit comments