summaryrefslogtreecommitdiffstats
path: root/hyperkitty/lib/__init__.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-10-05 15:01:59 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-10-05 15:01:59 +0200
commitc7570addec98c4e7695d83202650b9296e47c957 (patch)
tree147cd9e6e981acdd11efd6fd3950d8f936f8ae42 /hyperkitty/lib/__init__.py
parentcd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f (diff)
downloadhyperkitty-c7570addec98c4e7695d83202650b9296e47c957.tar.gz
hyperkitty-c7570addec98c4e7695d83202650b9296e47c957.tar.xz
hyperkitty-c7570addec98c4e7695d83202650b9296e47c957.zip
Improve appearance
Diffstat (limited to 'hyperkitty/lib/__init__.py')
-rw-r--r--hyperkitty/lib/__init__.py9
1 files changed, 9 insertions, 0 deletions
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