def signal_received_email(sender, sma, app_id, html, text, from_field, **kwargs): from utils import reply_to_thread, strip_quotes # circular dependency fix logger.debug("Sendgrid signal receive: %s, %s, %s, %s, %s, %s"%(sender, sma, app_id, html, text, from_field) ) if app_id == sendgrid_settings.THREADED_MESSAGES_ID: body ='' if text: body = text if not body: body = strip_tags(html) if body: strip_quotes(body) thread = sma.content_object reply_to_thread(thread, sma.user, body)
def signal_received_email(sender, sma, app_id, html, text, from_field, **kwargs): from utils import reply_to_thread, strip_quotes # circular dependency fix logger.debug("Sendgrid signal receive: %s, %s, %s, %s, %s, %s" % (sender, sma, app_id, html, text, from_field)) if app_id == sendgrid_settings.THREADED_MESSAGES_ID: body = '' if text: body = text if not body: body = strip_tags(html) if body: strip_quotes(body) thread = sma.content_object reply_to_thread(thread, sma.user, body)
def save(self, sender, thread): body = self.cleaned_data['body'] return reply_to_thread(thread, sender, body)