mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
94badcda15
There could be a few lurking bugs. Please test!
12 lines
440 B
JavaScript
12 lines
440 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}#`;
|
|
});
|
|
}
|
|
}
|
|
}
|