def redact_subject(self): content = self.subject if self.request.user: account_service = AccountService(self.request.user) content = account_service.apply_message_redaction(content) content = redact_content(content) return content[:255]
def redact_plaintext(self): content = self.plaintext content = redact_content(content) greeting_replacement = str(_("<< Greeting >>")) if not settings.FROIDE_CONFIG.get('public_body_officials_public'): if self.is_response: if settings.FROIDE_CONFIG.get('closings'): content = remove_closing( settings.FROIDE_CONFIG['closings'], content) else: if settings.FROIDE_CONFIG.get('greetings'): content = replace_custom( settings.FROIDE_CONFIG['greetings'], greeting_replacement, content) if self.request.user: content = self.request.user.apply_message_redaction(content) return content
def redact_subject(self): content = self.subject if self.request.user: content = self.request.user.apply_message_redaction(content) content = redact_content(content) return content[:255]
def get_description(self): return redact_content(self.description)