mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
12 lines
442 B
JavaScript
12 lines
442 B
JavaScript
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}#`;
|
|
});
|
|
}
|
|
}
|
|
}
|