예제 #1
0
    def persist_message(self, msg):
        notification = Notification()
        notification.sender = msg.sender
        notification.owner = users.User(utils.address_part(msg.sender))

        # TODO: Handle invalid delays
        delay = utils.email_in_path(self.request.path)
        notification.delay_str = delay
        notification.fire_time = datetime.datetime.now() + utils.parse_timedelta(delay)

        strip_cc(msg)
        try:
            strip_attachments(msg)
        except Exception, e:
            logging.warning('Found warning ' + str(e))
            pass