Improve documentation of handle_receive inbound method

Sender returned by the method is confusing as it's not necessarily the author of any of the returned entities. Clarify in the docstring.

Closes #16
merge-requests/130/head
Jason Robinson 2017-05-06 23:15:22 +03:00
rodzic be00546c39
commit 75272cc820
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -13,6 +13,15 @@ PROTOCOLS = (
def handle_receive(payload, user=None, sender_key_fetcher=None, skip_author_verification=False):
"""Takes a payload and passes it to the correct protocol.
Returns a tuple of:
- sender handle
- protocol name
- list of entities
NOTE! The returned sender is NOT necessarily the *author* of the entity. By sender here we're
talking about the sender of the *payload*. If this object is being relayed by the sender, the author
could actually be a different identity.
:arg payload: Payload blob (str)
:arg user: User that will be passed to `protocol.receive` (required on private encrypted content)
:arg sender_key_fetcher: Function that accepts sender handle and returns public key (optional)