~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/notification.py

  • Committer: Curtis Hovey
  • Date: 2011-04-23 00:46:36 UTC
  • mto: This revision was merged to the branch mainline in revision 12915.
  • Revision ID: curtis.hovey@canonical.com-20110423004636-25xtqy9mtzl2wuao
Removed the rules to preserve or rewite a question subject line from email.

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
        return question_changes
300
300
 
301
301
    def getSubject(self):
302
 
        """When a comment is added, its title is used as the subject,
303
 
        otherwise the question title is used.
304
 
        """
305
 
        prefix = '[Question #%s]: ' % self.question.id
306
 
        if self.new_message:
307
 
            # Migrate old prefix.
308
 
            subject = self.new_message.subject.replace(
309
 
                '[Support #%s]: ' % self.question.id, prefix)
310
 
            if prefix in subject:
311
 
                return subject
312
 
            elif subject[0:4] in ['Re: ', 'RE: ', 're: ']:
313
 
                # Place prefix after possible reply prefix.
314
 
                return subject[0:4] + prefix + subject[4:]
315
 
            else:
316
 
                return prefix + subject
317
 
        else:
318
 
            return prefix + self.question.title
 
302
        """The reply subject line."""
 
303
        line = super(QuestionModifiedDefaultNotification, self).getSubject()
 
304
        return 'Re: %s' % line
319
305
 
320
306
    def getHeaders(self):
321
307
        """Add a References header."""