1.1 --- a/MoinMessageSupport.py Sun Jan 26 00:44:09 2014 +0100
1.2 +++ b/MoinMessageSupport.py Sun Jan 26 00:46:41 2014 +0100
1.3 @@ -20,7 +20,7 @@
1.4 from email.parser import Parser
1.5 import time
1.6
1.7 -Dependencies = ['pages']
1.8 +RECIPIENT_PARAMETERS = ("type", "location", "fingerprint")
1.9
1.10 class MoinMessageAction:
1.11
1.12 @@ -344,7 +344,7 @@
1.13
1.14 """
1.15 For the user associated with the 'request', return the permitted actions for
1.16 - the user in the form of
1.17 + the user in the form of a list of "action:pagename" identifiers.
1.18 """
1.19
1.20 if not request.user or not request.user.valid:
1.21 @@ -387,7 +387,7 @@
1.22 if not recipient_details:
1.23 raise MoinMessageUnknownRecipient, _("The specified recipient is not present in the list of known contacts.")
1.24
1.25 - parameters = parseDictEntry(recipient_details, ("type", "location", "fingerprint",))
1.26 + parameters = parseDictEntry(recipient_details, RECIPIENT_PARAMETERS)
1.27
1.28 type = parameters.get("type")
1.29 location = parameters.get("location")
1.30 @@ -412,12 +412,16 @@
1.31 """
1.32
1.33 result = {}
1.34 - for recipient, parameters in recipients.items():
1.35 + for recipient, details in recipients.items():
1.36 + parameters = parseDictEntry(details, RECIPIENT_PARAMETERS)
1.37 +
1.38 if not fetching and parameters.get("type") in (None, "none"):
1.39 continue
1.40 if not sending and not parameters.get("fingerprint"):
1.41 continue
1.42 - result[recipient] = parameters
1.43 +
1.44 + result[recipient] = details
1.45 +
1.46 return result
1.47
1.48 # vim: tabstop=4 expandtab shiftwidth=4