Wykres commitów

1158 Commity (e8037ce4024292dfe9f8c74f7589e5b982712ee4)

Autor SHA1 Wiadomość Data
Marnanel Thurman 69fb4ef617 test_deliver in sombrero removed, bc it was against the old bowler API 2020-05-28 22:41:07 +01:00
Marnanel Thurman 04baf1d4fa More fields added to RemotePerson to bring it into line with LocalPerson.
Not all of them get filled in yet.
2020-05-25 17:12:40 +01:00
Marnanel Thurman fcdc7b69c5 Don't register httpretty hosts in setUp, because httpretty.enable resets the list! 2020-05-25 17:11:48 +01:00
Marnanel Thurman 8dedc78b80 rm test print 2020-05-25 17:11:32 +01:00
Marnanel Thurman eaa3461ccc A few more fields filled in for RemotePerson when we fetch their activitypub serialisation from another server. 2020-05-25 17:11:01 +01:00
Marnanel Thurman 0f61676a7f If we attempt to deliver a message, but we can't connect to the host,
log that but otherwise ignore it.
2020-05-25 17:09:39 +01:00
Marnanel Thurman 0f238027c6 Various parts of sombrero modified to use the new polymorphic models in trilby 2020-05-17 22:06:21 +01:00
Marnanel Thurman c482e4361d Sombrero's fetch_user allows usernames in "user@host" style as well as URLs. 2020-05-17 22:01:55 +01:00
Marnanel Thurman 83c7f511b5 trilby's RemotePerson's __str__() never returns None now! (Whoops.) 2020-05-17 22:01:16 +01:00
Marnanel Thurman 866f3db5cc fixed filename in source header 2020-05-16 21:50:25 +01:00
Marnanel Thurman b69cc119fe sombrero gains the ability to look up "user@hostname"-style addresses,
via webfinger. Tests updated.
2020-05-16 21:44:50 +01:00
Marnanel Thurman 461083c8ed sombrero's _async_fetch_user() marks the RemotePerson record as 404
before it raises any ValueError.
2020-05-16 02:14:05 +01:00
Marnanel Thurman deee11e822 Fixes to sombrero's fetch_user. This has required some rearrangement
of the fields in trilby's RemotePerson. Tests added.
2020-05-16 02:09:48 +01:00
Marnanel Thurman 0fec20ba5f trilby_api's Person model split into LocalPerson and RemotePerson,
using django_polymorphic.

The amount of special-casing of Person fields was becoming
unmanageable.
2020-05-13 01:38:06 +01:00
Marnanel Thurman 5a4d723392 Stub fetch in sombrero, and tests for it 2020-05-11 19:19:53 +01:00
Marnanel Thurman d5ed69ab3a FIXMEs 2020-05-11 19:19:35 +01:00
Marnanel Thurman fe7d31bde8 more fixing of sombrero's "deliver()" 2020-05-07 17:53:44 +01:00
Marnanel Thurman 31858ae3a7 likewise, rm check for "to" because it might not have been filled in yet 2020-05-07 17:53:22 +01:00
Marnanel Thurman ef46e32af7 The rewriting of sombrero's deliver() continues. Intermediate. 2020-05-07 17:30:14 +01:00
Marnanel Thurman 25b00216cb reduce fieldname checks on construction of sombrero OutgoingActivity
to "type" only. The others might not have been generated yet.
2020-05-07 17:29:30 +01:00
Marnanel Thurman 7c87961648 add logging 2020-05-07 17:29:04 +01:00
Marnanel Thurman 38bcf819fa trilby's Person gains a key_name property 2020-05-07 17:28:37 +01:00
Marnanel Thurman 30c0b694c1 small fixes to test_send in sombrero 2020-05-06 20:05:45 +01:00
Marnanel Thurman d5c72f7860 trilby's Person gains is_local 2020-05-06 20:05:30 +01:00
Marnanel Thurman 2e77df6454 Loads of rewriting of sombrero's "deliver" function so it works with the new model. It still needs more work, but this is an intermediate checkin.
OutgoingActivity model added to sombrero.

sombrero gains a "receivers" file so it can respond to follows etc.

Fetch model deleted from bowler, though I think it'll need to reappear in sombrero soon.
2020-05-06 20:04:34 +01:00
Marnanel Thurman 5e29730370 New sombrero test: test_send. The tests are mostly skipped;
the test for "follow" is implemented properly and it currently fails.

Also, some small fiddling on sombrero's test_deliver to remove code rot.
2020-05-05 19:11:43 +01:00
Marnanel Thurman 6a239db0aa Some tidying of bowler_pub's tests. More of a rewrite needed. 2020-05-01 14:06:49 +01:00
Marnanel Thurman e52dffe9ff Split out the part of bowler_pub that sends ActivityPub notifications
into a new app, sombrero_sendpub. Tests not yet passing.
2020-05-01 13:55:03 +01:00
Marnanel Thurman 388ce027a6 Busby tests now pass. We still need to re-implement the Atom feeds.
Commented this out because it needs adding back soon.
2020-05-01 13:39:53 +01:00
Marnanel Thurman 5c54575f29 Add busby_1st to the master URLs 2020-04-29 20:32:51 +01:00
Marnanel Thurman f610465f9b rm apps.py from busby because it was breaking import.
rm busby's URLs from bowler's urls.py.
2020-04-29 19:29:51 +01:00
Marnanel Thurman 2c273d0311 busby_1st split out from bowler_pub. Intermediate checkin. 2020-04-29 17:58:51 +01:00
Marnanel Thurman 2275c428a3 simple README for bowler_pub 2020-04-29 17:20:42 +01:00
Marnanel Thurman 50d8ce0518 Split out part of the Statuses view to the new SpecificStatus view.
Variables in URLs are named "user" and "status" rather than all
being "id", since that was inviting bugs.

Tests updated.
2020-04-26 14:34:15 +01:00
Marnanel Thurman f537cfc451 fixed test, for previous 2020-04-26 12:56:35 +01:00
Marnanel Thurman 78f983a611 - <id> in a request for statuses is the user ID, not the ID of a
particular status.

- When the user posts a status via the API, don't attempt to convert
  the status text to HTML.
2020-04-25 18:36:47 +01:00
Marnanel Thurman 98dd7724cb rm space 2020-04-25 17:21:06 +01:00
Marnanel Thurman 64b9116e6c API urls use the primary key of the Person table and not the username! 2020-04-25 17:20:22 +01:00
Marnanel Thurman 3858c95426 Content of statuses, and notes (bios) of users, are interpreted as markdown
and returned as HTML.
2020-04-25 16:40:06 +01:00
Marnanel Thurman 42909bb629 removing "application" from the status serializer, since we're
not in a place to give the information. Added FIXME about why.
Updated test.
2020-04-25 16:12:04 +01:00
Marnanel Thurman c03a2ce3ea Status.url returns a reasonable value. Test for this is written.
Both Status and Person's uri property returns the value of their url properties for now.
2020-04-24 15:51:36 +01:00
Marnanel Thurman 445ea187f9 Image fields in trilby_api.Person return absolute URLs.
They are now optional in forms.

default_visibility in trilby_api.Person's "source" subfield
returns the display name (like, "public" instead of "A").

Tests added for trilby_api.Person's "source" subfield.

trilby_api.utils created, just to hold the visiblity
choices list, which is moved out of Status.
2020-04-24 15:39:51 +01:00
Marnanel Thurman f3a1e62887 "uri" for trilby_api.Person now returns the same as "url" 2020-04-24 14:21:42 +01:00
Marnanel Thurman 1653a0b354 Visibility of a status is limited to the four visibility values 2020-04-23 20:14:55 +01:00
Marnanel Thurman 7d4158ec02 "acct" is just the username for local accounts 2020-04-23 20:07:27 +01:00
Marnanel Thurman 7a4a278f0e user "id" field is an int 2020-04-23 19:38:18 +01:00
Marnanel Thurman f55de4589a Trilby's Person class has a method "by_name()" which looks up a Person by name (or URL). 2020-04-23 19:02:27 +01:00
Marnanel Thurman faad85af3d follow back 2020-04-22 17:23:53 +01:00
Marnanel Thurman 309a6986fb trilby's create_local_person passes its kwargs to Person's constructor.
Error message for unexpected HTTP status codes improved.
New tests: follow unknown user, and follow autofollow user.
The latter doesn't yet work.
2020-04-22 17:10:57 +01:00
Marnanel Thurman 83ebca57ad rm unused constant 2020-04-22 17:02:32 +01:00