From d5ed69ab3a4f40231d6e8022488f71f7133d92d9 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Mon, 11 May 2020 19:19:35 +0100 Subject: [PATCH] FIXMEs --- kepi/sombrero_sendpub/delivery.py | 3 +++ kepi/sombrero_sendpub/tests/test_send.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/kepi/sombrero_sendpub/delivery.py b/kepi/sombrero_sendpub/delivery.py index 96e90fc..e808dc2 100644 --- a/kepi/sombrero_sendpub/delivery.py +++ b/kepi/sombrero_sendpub/delivery.py @@ -269,6 +269,9 @@ def _deliver_remote( logger.debug(' -- headers are %s', headers) + # FIXME This is wrong-- we have to look up their inbox address + # if we don't have it, and post to that + response = requests.post( recipient.url, data=str(message), diff --git a/kepi/sombrero_sendpub/tests/test_send.py b/kepi/sombrero_sendpub/tests/test_send.py index 70abf3a..55534c7 100644 --- a/kepi/sombrero_sendpub/tests/test_send.py +++ b/kepi/sombrero_sendpub/tests/test_send.py @@ -22,11 +22,16 @@ class TestSend(TestCase): def setUp(self): httpretty.register_uri( + # FIXME: not the user's address, just their (shared) inbox httpretty.POST, REMOTE_URL, '', # body is ignored ) + # FIXME Here we must also register an ActivityPub form of the user + # at the remote end + # FIXME It would be nice if we could check the Accept content-type + self._zachary = Person( remote_url = REMOTE_URL, remote_username = 'zachary',