Mailspring/packages/client-app/internal_packages/message-autoload-images/lib/autoload-images-extension.es6

12 lines
442 B
JavaScript

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