From c7570addec98c4e7695d83202650b9296e47c957 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Fri, 5 Oct 2012 15:01:59 +0200 Subject: Improve appearance --- hyperkitty/lib/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hyperkitty/lib/__init__.py') diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py index 0ae2a7f..1ab04cd 100644 --- a/hyperkitty/lib/__init__.py +++ b/hyperkitty/lib/__init__.py @@ -59,3 +59,12 @@ def get_months(store, list_name): def get_store(request): return request.environ["kittystore.store"] + + +def stripped_subject(mlist, subject): + if mlist is None: + return subject + list_name = mlist.display_name or mlist.name[:mlist.name.index("@")] + if subject.lower().startswith("[%s] " % list_name.lower()): + subject = subject[len(list_name)+3 : ] + return subject -- cgit