Wykres commitów

318 Commity (f62aba3c3d0638c79751e5a765dc1faee8e01aa4)

Autor SHA1 Wiadomość Data
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 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 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 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 f126d7adca KepiView.activity() renamed activity_get().
Otherwise, it gets confusing because of activity_store().
2019-07-30 19:22:22 +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 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 a412f6cbc1 InboxView fixed up to match OutboxView 2019-07-25 17:17:40 +01:00
Marnanel Thurman e2a9df0cd7 Check whether a public key is represented by a dict rather than a string.
If it is, grab the actual key string from the relevant field.
2019-07-25 17:16:40 +01:00
Marnanel Thurman 55aaff9a4a Removed extraneous deletes() on errors, because Thing will delete for us.
delete() implemented.
2019-07-22 17:59:59 +01:00
Marnanel Thurman fc3f213757 Thing fields named f_* have content correctly parsed as JSON.
Thing.entomb() had rotted; fixed.

Debug print removed.
2019-07-22 17:58:04 +01:00
Marnanel Thurman 270e55b1af Introduced django_kepi.side_effects, to move all that special-case
code out of django_kepi.models.thing.
2019-07-22 17:30:15 +01:00
Marnanel Thurman d278a8d69e Put an import back which somehow got deleted and broke stuff 2019-07-22 14:16:04 +01:00
Marnanel Thurman 32ee56b18e Update to outbox doesn't work on objects you don't own 2019-07-21 18:43:54 +01:00
Marnanel Thurman 517ea268a4 Update activities to outbox work. 2019-07-21 18:38:50 +01:00
Marnanel Thurman 2b6468b7d6 Add f_actor to Thing, because it's too common to keep in other_fields 2019-07-21 18:05:48 +01:00
Marnanel Thurman 98567b816c Creates which fail get deleted. 2019-07-21 17:26:09 +01:00
Marnanel Thurman 05e4d0ccf6 IncomingMessage.fields memoised 2019-07-21 16:55:15 +01:00
Marnanel Thurman b4f4a164cf Test for posting non-activities to outbox. Currently fails. 2019-07-20 23:35:52 +01:00
Marnanel Thurman 5c5a9b7017 Tests for posting to outbox with incorrect IDs both local and remote.
They pass.
2019-07-20 23:26:46 +01:00
Marnanel Thurman 806706825b rm debug message 2019-07-20 23:26:01 +01:00
Marnanel Thurman 609be9b810 f_preferredUsername is stored in JSON 2019-07-19 22:12:39 +01:00
Marnanel Thurman 6c964dddd6 "key" is the whole string, not a dict containing it 2019-07-19 22:12:17 +01:00
Marnanel Thurman 01dc57338c rm serializers.py, which was left around from un_chapeau 2019-07-18 14:32:26 +01:00
Marnanel Thurman 368814cd9c Migration to add f_ prefixes in Actor. Should have been in 8aa62d5a. 2019-07-18 14:31:06 +01:00
Marnanel Thurman 5a02c8c93f Outbox passes is_local_user to validate. Debug messages cleaned up a bit. 2019-07-18 14:29:31 +01:00
Marnanel Thurman 13a3f47d42 Lots of checks on objects created by "Create" 2019-07-18 14:28:51 +01:00
Marnanel Thurman 8aa62d5abd Fields unique to Actor have the "f_" prefix if they're fields of the Thing.
For example, publicKey becomes f_publicKey. This allows polymorphic subscripting.

Also, cleaned up some of the code from before we introduced polymorphism.
2019-07-18 14:27:21 +01:00
Marnanel Thurman c57db91ce1 Removing some debug messages which were duplicated elsewhere. 2019-07-18 14:26:02 +01:00
Marnanel Thurman eb6408badf missing logging parameter 2019-07-18 14:25:10 +01:00
Marnanel Thurman a5eba85fea Rename validate()'s "is_local" to "is_local_user", and store it in the model.
This is because "is_local" is ambiguous; was the message received
locally (not over the network), or was the user a local user?
2019-07-18 14:23:43 +01:00
Marnanel Thurman bf0c673a79 stub OutboxView 2019-07-18 12:16:44 +01:00
Marnanel Thurman f65a6d4b08 validate() sets up the task and calls it.
It isn't itself the task, as before.
2019-07-18 12:16:02 +01:00
Marnanel Thurman 18565c6afe Huge checkin: central project "kepi" to use the "django_kepi" library.
This has shown up some bugs. Checking in the fixes for them too.
2019-07-11 18:25:06 +01:00
Marnanel Thurman c59228c58f Remove ActorView. Use ThingView instead.
ActorView was based on a (very) old design where Actors were
special-cased.
2019-07-11 17:40:12 +01:00
Marnanel Thurman b6697c81c6 Attempting to get the visibility tests passing. Not there yet. 2019-07-11 17:24:22 +01:00