1.1 --- a/imiptools/handlers/person.py Sun Oct 26 00:45:58 2014 +0200
1.2 +++ b/imiptools/handlers/person.py Sun Oct 26 17:51:04 2014 +0100
1.3 @@ -5,9 +5,15 @@
1.4 """
1.5
1.6 from email.mime.text import MIMEText
1.7 +from imiptools.config import MANAGER_PATH, MANAGER_URL
1.8 from imiptools.content import Handler, to_part
1.9 +from socket import gethostname
1.10 from vCalendar import to_node
1.11
1.12 +def get_manager_url():
1.13 + url_base = MANAGER_URL or "http://%s/" % gethostname()
1.14 + return "%s/%s" % (url_base.rstrip("/"), MANAGER_PATH.lstrip("/"))
1.15 +
1.16 class PersonHandler(Handler):
1.17
1.18 "Handling mechanisms specific to people."
1.19 @@ -108,7 +114,8 @@
1.20
1.21 # The message is now wrapped and passed on to the recipient.
1.22
1.23 - return "REQUEST", MIMEText("A request has been queued.")
1.24 + url = "%s/%s" % (get_manager_url().rstrip("/"), self.uid)
1.25 + return "REQUEST", MIMEText("A request has been queued and can be viewed here: %s" % url)
1.26
1.27 class Freebusy(PersonHandler):
1.28