Mailspring/internal_packages/message-autoload-images/lib/autoload-images-extension.es6

13 lines
440 B
Text
Raw Normal View History

import AutoloadImagesStore from './autoload-images-store';
import {MessageViewExtension} from 'nylas-exports';
export default class AutoloadImagesExtension extends MessageViewExtension {
static formatMessageBody = ({message})=> {
if (AutoloadImagesStore.shouldBlockImagesIn(message)) {
message.body = message.body.replace(AutoloadImagesStore.ImagesRegexp, (match, prefix)=> {
return `${prefix}#`;
});
}
}
}