1.1 --- a/actions/SendMessage.py Sat Feb 01 01:17:27 2014 +0100
1.2 +++ b/actions/SendMessage.py Sun Feb 02 00:15:45 2014 +0100
1.3 @@ -13,7 +13,7 @@
1.4 from MoinMessage import GPG, MoinMessageError, Message, sendMessage, timestamp, \
1.5 as_string
1.6 from MoinMessageSupport import get_signing_users, get_recipients, get_relays, \
1.7 - get_recipient_details, \
1.8 + get_recipient_details, get_signing_identity, \
1.9 MoinMessageRecipientError, OutgoingHTMLFormatter
1.10 from MoinSupport import *
1.11 from ItemSupport import ItemStore
1.12 @@ -256,7 +256,7 @@
1.13
1.14 # Obtain the actual location if a relay is specified.
1.15
1.16 - if parameters["type"] == "relay":
1.17 + if type == "relay":
1.18 relays = get_relays(request)
1.19 if not relays:
1.20 return 0, _("No relays are defined for MoinMessage, but one is specified for the recipient.")
1.21 @@ -275,18 +275,9 @@
1.22 message = gpg.signMessage(message, signer)
1.23
1.24 message = gpg.encryptMessage(message, parameters["fingerprint"])
1.25 -
1.26 - # Send relayed messages with an extra signature.
1.27 -
1.28 - if type == "relay":
1.29 - relaying_user = getattr(request.cfg, "moinmessage_gpg_relaying_user")
1.30 + signer = get_signing_identity(request, type)
1.31
1.32 - # Signing with the same identity if no special relaying user is
1.33 - # defined.
1.34 -
1.35 - if relaying_user:
1.36 - signer = signing_users and signing_users.get(relaying_user)
1.37 -
1.38 + if signer:
1.39 timestamp(message)
1.40 message["Update-Action"] = "store"
1.41 message = gpg.signMessage(message, signer)