Marnanel Thurman
bb67a18112
Where an identifier of a remote object is called "url", rename it to "remote_url".
...
We were calling it "url" in some places and "remote_url" in others.
2020-10-19 16:17:58 +01:00
Marnanel Thurman
d2fda1e974
Only local accounts can receive Notifications. Closes issue #43 .
...
As part of this, remove the previously undiscovered ability to send Accepts for remote users!
2020-10-11 15:46:06 +01:00
Marnanel Thurman
d3c0663a96
LocalPerson gains "featured" attribute. Bowler gains FeaturedView.
...
Tests updated. Closes issue #41 .
2020-10-11 15:36:58 +01:00
Marnanel Thurman
265f863746
test to demonstrate that featured collections are broken (see issue #41 ).
...
Test object in test_views renamed "Tests" per my own style guide.
2020-10-11 15:07:17 +01:00
Marnanel Thurman
90e815f888
Version bump to 0.4.5 "archer"; various bits of package metadata changed
2020-10-10 02:54:36 +01:00
Marnanel Thurman
7f3a4a04ff
MANIFEST.in includes markdown and images in docs/
2020-10-10 02:54:13 +01:00
Marnanel Thurman
df35f1c389
Sombrero notifies remote users when a local status is posted.
...
Closes issue #42 .
2020-10-10 02:17:05 +01:00
Marnanel Thurman
9d679815a6
trilby_api.models.Status gains "is_local" for symmetry with Person.
...
Tests updated.
2020-10-10 02:16:31 +01:00
Marnanel Thurman
e4556225da
Regression test for issue #42 . Currently fails because that bug is open.
2020-10-10 01:57:17 +01:00
Marnanel Thurman
1d4b0f957a
Creating a Status causes trilby_api.signals.posted to be sent.
...
The signal isn't currently received by anything.
2020-10-09 15:04:51 +01:00
Marnanel Thurman
e2565849d8
Creating a new TrilbyUser (e.g. using Django's "createsuperuser") automatically creates a new LocalPerson for that user.
...
Closes issue #18 .
2020-10-09 03:26:15 +01:00
Marnanel Thurman
c21047f2a9
test fixed to expect the shared inbox to be called /sharedInbox and not /inbox.
...
It was broken by commit 13ff6ba6
.
2020-10-09 03:13:59 +01:00
Marnanel Thurman
577be40042
16x16 icon for the-federation.info
2020-10-03 01:11:31 +01:00
Marnanel Thurman
85c40b4971
pngcrush
2020-10-03 01:11:20 +01:00
Marnanel Thurman
895646740f
rm old icon
2020-10-03 01:05:23 +01:00
Marnanel Thurman
8833f3a5f5
note about the magazine
2020-10-02 22:55:00 +01:00
Marnanel Thurman
ef35989525
hat-person is a jpg
2020-10-02 22:53:53 +01:00
Marnanel Thurman
048eacde36
docs/name.md
2020-10-02 22:52:32 +01:00
Marnanel Thurman
6a69a22bde
update installation documentation, and note about bowler-heavy
2020-10-02 22:29:20 +01:00
Marnanel Thurman
fec31acb4c
updated README.md
2020-10-02 22:01:24 +01:00
Marnanel Thurman
57e780e4c8
Hat person
2020-10-02 21:37:00 +01:00
Marnanel Thurman
3d8a55f485
Roadmap, such as it is
2020-10-02 21:34:48 +01:00
Marnanel Thurman
651d9bb363
fix markdown header syntax
2020-10-02 21:25:01 +01:00
Marnanel Thurman
9344b54f59
modules.md
2020-10-02 21:23:06 +01:00
Marnanel Thurman
7f1c93c431
Update kepi.[pn|sv]g to the new hat-and-heart logo.
...
Add a slightly tweaked version of the original snake picture.
2020-10-02 21:06:04 +01:00
Marnanel Thurman
4dcb6a4e61
rm a lot of Sphinx stuff
2020-10-02 20:59:00 +01:00
Marnanel Thurman
13ff6ba639
SHARED_INBOX_LINK set to '/sharedInbox' because that's what urls.py is expecting
2020-09-30 16:26:21 +01:00
Marnanel Thurman
c9ad177220
Added top-level exception handler to InboxView, since it seems to be experiencing difficulties.
...
Really this needs to be a more general solution.
2020-09-30 16:20:22 +01:00
Marnanel Thurman
ceed10b278
DEBUG=False by default!
2020-09-30 16:14:48 +01:00
Marnanel Thurman
b5a7f7114d
Attempts to fetch(None) get None.
...
It sometimes happens in the wild that someone submits "inReplyTo: null" or similar.
2020-09-30 16:13:02 +01:00
Marnanel Thurman
3d38c6618a
Replaced the "requested" flag in Follow with an "offer" field which holds the ID of the follow request.
2020-09-30 15:44:16 +01:00
Marnanel Thurman
9d8f4613d4
When trilby_api hears about a follow request, and the person being
...
followed has "auto_follow" turned on, the request is automatically
granted. If the follower is remote, they automatically get sent an
Accept activity. This fixes a regression.
As part of this, bowler_pub.create() now sends the ID of the Follow
activity through the signal.
Also, trilby_api.receivers now uses sensible renames for the
"sender" parameters-- they're really the activities which caused
the signal.
2020-09-28 17:08:15 +01:00
Marnanel Thurman
3a1a5f6db2
Remote users following local users causes the "followed" signal
2020-09-28 16:30:58 +01:00
Marnanel Thurman
dbc5e47b4b
Messages posted to user inboxes, and to the shared inbox, will be acted upon.
...
Closes issue #37 .
2020-09-21 18:10:34 +01:00
Marnanel Thurman
4982c4daed
Two tests in test_create were attempting to resolve "somewhere.example.com"
...
(and failing, obviously). This should have been mocked but wasn't.
This need some deeper investigation so I've @skip()ped them for now.
(One of the tests was previously @expected_failure.)
2020-09-21 18:09:10 +01:00
Marnanel Thurman
0eb479129f
extra debug logging
2020-09-21 18:08:48 +01:00
Marnanel Thurman
9afc7dd220
If you pass a bytestring to validate(), and it doesn't decode cleanly, log this and exit gracefully.
...
There's still a remaining issue: we always decode the bytestring as UTF-8, but it might not be. Marked with XXX.
Hence also: log.info() the incoming message before attempting to decode the bytestring.
Also: don't bother logging when we've launched the validation task, since that always succeeds.
2020-09-21 17:55:46 +01:00
Marnanel Thurman
0679cb12ae
log_one_message allows the "body" parameter to be a bytestring as well as a dict.
...
This is because incoming messages are no longer parsed straight away (see commit 83b69f2f
).
2020-09-21 17:50:19 +01:00
Marnanel Thurman
293191a1f6
The bowler_pub functions which create test messages require extra fields to be supplied as a "fields" parameter.
...
Previously we allowed callers to specify them as arguments, if the argument name was preceded by "f_".
This caused ambiguities and was too much faff to be useful.
Tests updated accordingly.
Also, one test message copied from the ActivityPub spec was slightly in breach of actual usage conventions. Fixed.
2020-09-21 17:48:51 +01:00
Marnanel Thurman
83b69f2fcb
ActivityParser doesn't parse the JSON of incoming messages.
...
This is because when we validate the message, a little further
down the line, we need access to the exact content of the message.
Parsing it here would destroy the exact content, because Django
doesn't let you read request bodies twice.
2020-09-21 17:43:57 +01:00
Marnanel Thurman
f95163dc04
Drop incoming messages with no type
2020-09-21 17:43:32 +01:00
Marnanel Thurman
2043ca8eaf
When we create a Status from a Create message, catch exceptions and treat as failure.
2020-09-21 17:08:20 +01:00
Marnanel Thurman
482f3132e0
rm unused field "is_local_user" in IncomingMessage
2020-09-20 23:53:54 +01:00
Marnanel Thurman
c4c5555c8b
Modernised the "send to inbox" tests which were taken from bowler_heavy.
...
Previously they were all marked @skip. They are no longer skipped, but they don't pass.
Clearly there's work to be done there. More work will probably also be needed in modernising the tests.
2020-09-19 20:32:27 +01:00
Marnanel Thurman
82d8c55701
Added a django-rest-framework parser so we accept uploads of type
...
"application/activity+json".
2020-09-19 20:29:12 +01:00
Marnanel Thurman
6023aa9c36
Inbox stub status should be 403, not 410!!
2020-09-19 18:33:24 +01:00
Marnanel Thurman
513c2d52e5
logger.warn is now logger.warning (pylint W1505)
2020-09-19 16:25:31 +01:00
Marnanel Thurman
1ce2d41e1e
Updated all copyright dates to 2020
2020-09-19 16:18:32 +01:00
Marnanel Thurman
48fbb745de
removed trailing whitespace throughout (pylint C0303)
2020-09-19 15:58:35 +01:00
Marnanel Thurman
ebe785bda4
rm trailing newlines (pylint C0304)
2020-09-19 15:16:47 +01:00