Add documentation about params

Add sender title paramater. Fix call of gateway.

git-svn-id: https://svn.erp5.org/repos/experimental@1964 bc57dcba-3610-0410-ab4f-dc20bb96b918
parent 45726840
......@@ -50,18 +50,25 @@ class SMSTool(BaseTool):
manage_overview = DTMLFile('explainSMSTool', _dtmldir )
security.declareProtected(ManagePortal, 'send')
def send(self, text,recipient, sender=None, message_type="text",
test=False, gateway_reference='default',
def send(self, text,recipient, sender=None, sender_title=None,
message_type="text", test=False, gateway_reference='default',
document_relative_url=None, activate_kw=None, **kw):
"""
document_relative_url (optional) : allows to send back result to a document
activate_kw (optional) : Call SMSTool_afterSend if founded in activity with
message_id_list and document_relative_url
"""
gateway = self.find(gateway_reference)
message_id_list = gateway.send(text,recipient,
sender=sender, message_type="text",
test=False, **kw)
message_id_list = gateway.send(text=text,
recipient=recipient,
sender=sender,
sender_title=sender_title,
message_type=message_type,
test=test,
**kw)
if getattr(self, 'SMSTool_afterSend'):
# We need to use activities in order to avoid any conflict
send_activate_kw = {'activity':'SQLQueue'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment