summaryrefslogtreecommitdiffstats
path: root/hyperkitty/lib/view_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'hyperkitty/lib/view_helpers.py')
-rw-r--r--hyperkitty/lib/view_helpers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/hyperkitty/lib/view_helpers.py b/hyperkitty/lib/view_helpers.py
index fb8e897..283c1e3 100644
--- a/hyperkitty/lib/view_helpers.py
+++ b/hyperkitty/lib/view_helpers.py
@@ -156,3 +156,10 @@ def get_recent_list_activity(store, mlist):
# return the proper format for the javascript chart function
return [ {"date": d, "count": emails_per_date[d]}
for d in sorted(emails_per_date) ]
+
+
+def show_mlist(mlist, request):
+ def get_domain(host):
+ return ".".join(host.split(".")[-2:])
+ return (get_domain(mlist.name.partition("@")[2])
+ == get_domain(request.get_host()))