{"action":"created","issue":{"url":"https://api.github.com/repos/jhillyerd/enmime/issues/68","repository_url":"https://api.github.com/repos/jhillyerd/enmime","labels_url":"https://api.github.com/repos/jhillyerd/enmime/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/jhillyerd/enmime/issues/68/comments","events_url":"https://api.github.com/repos/jhillyerd/enmime/issues/68/events","html_url":"https://github.com/jhillyerd/enmime/pull/68","id":314310490,"number":68,"title":"Fix parseBinaryOnlyBody by adding Content","user":{"login":"ostcar","id":977937,"avatar_url":"https://avatars0.githubusercontent.com/u/977937?v=4","gravatar_id":"","url":"https://api.github.com/users/ostcar","html_url":"https://github.com/ostcar","followers_url":"https://api.github.com/users/ostcar/followers","following_url":"https://api.github.com/users/ostcar/following{/other_user}","gists_url":"https://api.github.com/users/ostcar/gists{/gist_id}","starred_url":"https://api.github.com/users/ostcar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostcar/subscriptions","organizations_url":"https://api.github.com/users/ostcar/orgs","repos_url":"https://api.github.com/users/ostcar/repos","events_url":"https://api.github.com/users/ostcar/events{/privacy}","received_events_url":"https://api.github.com/users/ostcar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-14T08:21:04Z","updated_at":"2018-04-15T17:54:18Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/jhillyerd/enmime/pulls/68","html_url":"https://github.com/jhillyerd/enmime/pull/68","diff_url":"https://github.com/jhillyerd/enmime/pull/68.diff","patch_url":"https://github.com/jhillyerd/enmime/pull/68.patch"},"body":"Currently, the `Content` of a BinaryOnlyMail is empty. It is possible to access the content with `env.Inlines[0].Content`, but this does not work in any case.\r\n\r\nIn my use case, I save all images from incoming messages. I do this with `DepthMatchAll()`. It returns a list of `Part`-objects. But in a BinaryOnlyMail there is no link between the `Part` and `env.Inlines[0]`. So without this patch, I see no way to access the content."},"comment":{"url":"https://api.github.com/repos/jhillyerd/enmime/issues/comments/381424968","html_url":"https://github.com/jhillyerd/enmime/pull/68#issuecomment-381424968","issue_url":"https://api.github.com/repos/jhillyerd/enmime/issues/68","id":381424968,"user":{"login":"jhillyerd","id":2502736,"avatar_url":"https://avatars3.githubusercontent.com/u/2502736?v=4","gravatar_id":"","url":"https://api.github.com/users/jhillyerd","html_url":"https://github.com/jhillyerd","followers_url":"https://api.github.com/users/jhillyerd/followers","following_url":"https://api.github.com/users/jhillyerd/following{/other_user}","gists_url":"https://api.github.com/users/jhillyerd/gists{/gist_id}","starred_url":"https://api.github.com/users/jhillyerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhillyerd/subscriptions","organizations_url":"https://api.github.com/users/jhillyerd/orgs","repos_url":"https://api.github.com/users/jhillyerd/repos","events_url":"https://api.github.com/users/jhillyerd/events{/privacy}","received_events_url":"https://api.github.com/users/jhillyerd/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T17:54:18Z","updated_at":"2018-04-15T17:54:18Z","author_association":"OWNER","body":"What I was thinking was something like:\r\n```go\r\nif len(imageParts[0].Content) == 0 {\r\n  if len(envelope.Inlines) > 0 {\r\n    content = envelope.Inlines[0].Content\r\n  } else if len(envelope.Attachments) > 0 {\r\n    content = envelope.Attachments[0].Content\r\n  }\r\n} else {\r\n  content = part.Content\r\n}\r\n```\r\n\r\nbut I agree, it's hacky.  Can you share the code for `imageMatcher`?  That may help me visualize things better."}}
{"actor":{"display_login":"jhillyerd"}}