Marnanel Thurman
6c3e8edc55
remove old send_to_inbox test, and move send_to_inbox2 over it
2019-08-05 13:31:07 +01:00
Marnanel Thurman
82da292419
Ported the remaining tests from inbox to inbox2
2019-08-05 13:30:34 +01:00
Marnanel Thurman
3550a118b6
Extra fields in Thing go back into ThingFields,
...
rather than being stored in Thing.other_fields.
Long overdue.
2019-08-05 13:11:44 +01:00
Marnanel Thurman
fc57cc4c71
Error checking. Call _after_create() if it exists.
2019-08-05 13:09:43 +01:00
Marnanel Thurman
0e298c1ac2
test_send_to_inbox2 has test_create and test_follow working at the same time :)
2019-08-04 22:56:05 +01:00
Marnanel Thurman
aa26a237be
more error checking for delivery
2019-08-04 22:55:53 +01:00
Marnanel Thurman
acf2ff5b04
Side-effects for "Follow" work properly now.
2019-08-04 22:44:53 +01:00
Marnanel Thurman
77d02c0317
Various caching issues with find_remote fixed
2019-08-04 22:43:34 +01:00
Marnanel Thurman
803d6bc176
Removed rogue comma that caused key names to be tuples
2019-08-04 22:42:37 +01:00
Marnanel Thurman
1fbda3d3ab
Improved error handling during delivery
2019-08-04 22:42:09 +01:00
Marnanel Thurman
de9fd89190
Brought test_write_to_inbox2 more up to date; it now passes
2019-08-01 17:54:31 +01:00
Marnanel Thurman
2327c49f8d
If create() fails, validation doesn't attempt delivery.
...
Improved debug logging.
2019-08-01 17:53:53 +01:00
Marnanel Thurman
dfbf912801
test_send_to_inbox2 doesn't attempt to GET as a test, because
...
there's no guarantee in the spec that it'll be visible
2019-08-01 16:34:07 +01:00
Marnanel Thurman
cd81fce725
Thing.activity_form() does the right thing if local fields are None
2019-08-01 16:32:23 +01:00
Marnanel Thurman
0c0e9b5290
Collections.get() searches on owner, not username of owner
...
(how did the old version ever work?)
2019-08-01 16:31:49 +01:00
Marnanel Thurman
2dda098010
Added test_read_announce.
...
Modified checking to look for the correct types in the result,
for the non-empty tests.
Fix to test_read_empty calling a method with the wrong name!
2019-08-01 16:20:51 +01:00
Marnanel Thurman
a6a42576cb
activity.go_into_outbox_if_local() called by FollowersView,
...
not as a special case of side effect.
2019-08-01 16:17:55 +01:00
Marnanel Thurman
f62aba3c3d
Don't even attempt to deliver to Public
2019-08-01 16:10:57 +01:00
Marnanel Thurman
f08c547ebf
generalised ATSIGN_CONTEXT
2019-08-01 16:03:23 +01:00
Marnanel Thurman
a439768290
Debug logging added. Logger name changed to django_kepi like the package
2019-08-01 16:01:29 +01:00
Marnanel Thurman
dcb4a9ec9b
Refactored rendering of objects into JSON.
...
_make_query_page() renamed to _make_query_page_url().
Default _modify_list_item renders the item as if it had been requested singly,
rather than just running it through str().
Debug logging.
2019-08-01 15:59:50 +01:00
Marnanel Thurman
3cb624250f
"Create" activities have the object written out in full
2019-08-01 15:58:40 +01:00
Marnanel Thurman
414b89197c
Don't print find result to logger unless result is not None
2019-08-01 15:58:19 +01:00
Marnanel Thurman
c99d0a2000
COLLECTION_PATH corrected
2019-07-31 20:41:27 +01:00
Marnanel Thurman
0de4de3f1f
OutboxView has an activity_store; FollowingView has a no-op activity_store
2019-07-31 20:40:46 +01:00
Marnanel Thurman
20d82ba511
Create's side effect includes going into outbox if local
2019-07-31 20:40:05 +01:00
Marnanel Thurman
a6c51879a0
Fixing list_path; f_preferredUsername is stored in JSON (why? this is silly)
...
rm debug message
2019-07-31 20:38:56 +01:00
Marnanel Thurman
a3674c941d
Activity.go_into_outbox_if_local()
2019-07-31 20:38:31 +01:00
Marnanel Thurman
7248b91edc
find_local can take an object_to_store
2019-07-31 20:37:46 +01:00
Marnanel Thurman
edb2f0334a
_put_stuff_in_inbox renamed to _put_stuff_in_outbox (oops)
2019-07-31 19:52:04 +01:00
Marnanel Thurman
892ab39d9b
test_read_create, though it doesn't pass yet.
2019-07-31 19:51:08 +01:00
Marnanel Thurman
26cf459b9f
Use the new "value" param for create. Also, run_delivery=False.
2019-07-31 19:50:41 +01:00
Marnanel Thurman
e16178ba00
create() can run local delivery if you pass run_delivery=True.
...
It can also optionally take a "value" parameter as well as
reading the fields of the new object out of kwargs.
2019-07-31 19:49:42 +01:00
Marnanel Thurman
50c4f2f6b7
test_read_from_outbox, initial
2019-07-31 19:11:04 +01:00
Marnanel Thurman
4882f76ec3
Rearranging inbox and outbox tests into "send to" and "read from".
2019-07-31 18:59:56 +01:00
Marnanel Thurman
f126d7adca
KepiView.activity() renamed activity_get().
...
Otherwise, it gets confusing because of activity_store().
2019-07-30 19:22:22 +01:00
Marnanel Thurman
229bbfae15
Public keys can be strings or dicts containing the string.
2019-07-30 19:18:34 +01:00
Marnanel Thurman
ee070e6992
Some more error checking in Collection.build_name
2019-07-30 19:17:32 +01:00
Marnanel Thurman
f019d7b67e
deliver() gains the "incoming" parameter, for local delivery
...
of incoming messages.
Validation doesn't track target collections any more. Instead,
when it's validated, it passes the message over to deliver(),
with incoming=True.
Hence, validation.IncomingMessage loses the "target_collection" field.
2019-07-30 19:16:25 +01:00
Marnanel Thurman
105b9fd5eb
KepiView can take an activity_store request (which I just made up)
...
ActorView split out from ThingView.
"name" field in URLs renamed to "username".
2019-07-30 19:14:29 +01:00
Marnanel Thurman
7e6f649b4f
test_outbox reads back from the outbox
2019-07-30 19:09:20 +01:00
Marnanel Thurman
df1b151d69
Created object gets reasonable 'to' field.
...
'to' and 'cc' get copied to Create activity.
2019-07-30 19:06:02 +01:00
Marnanel Thurman
30888694d1
Thing.audiences property
2019-07-30 19:04:26 +01:00
Marnanel Thurman
8bb5feff89
USER_URL_FORMAT user name field is "username" to disambiguate from collection name
...
inbox and outbox views are special cases of collection views
2019-07-30 16:23:29 +01:00
Marnanel Thurman
4af7301fae
pass in target_collection
2019-07-30 16:22:44 +01:00
Marnanel Thurman
5f5afa1978
Collection views contain the activity_forms of the members, not just the ids
2019-07-26 17:53:01 +01:00
Marnanel Thurman
9cad59bdc2
add fixme
2019-07-26 17:52:47 +01:00
Marnanel Thurman
8348be5f56
Added Collection model, and modified the collection views to display it.
...
Tests in test_inbox2 use it, but this is a work in progress.
2019-07-26 17:47:44 +01:00
Marnanel Thurman
579266b5fa
test_inbox2. Like test_inbox, but using the tools built for test_outbox.
...
When test_inbox2 is working, I'll merge it with test_inbox.
2019-07-25 17:18:09 +01:00
Marnanel Thurman
a412f6cbc1
InboxView fixed up to match OutboxView
2019-07-25 17:17:40 +01:00