Wykres commitów

84 Commity (0b5c6543838fa93f92db87352bc3d102d45240fe)

Autor SHA1 Wiadomość Data
Marnanel Thurman 12db4732cb AcActor handles display_name correctly for local users (regression fixed) 2019-12-19 18:49:51 +00:00
Marnanel Thurman 37054416d9 trilby's Notification gains attribute about_account_actor 2019-12-19 18:44:34 +00:00
Marnanel Thurman 985a23ce5c AcObject gains attributes: acct, hostname, preferredUsername, and display_name 2019-12-19 18:43:41 +00:00
Marnanel Thurman 5694851bcd In trilby_api.models
====================

Notification uses constants within the class
to represent notification types, as the docs recommend, rather than
using enum.Enum.

Notification.about_account is added. The existing "account" field
is renamed for_account for clarity.

Notification also gains a __str__() method.

on_follow modified to work properly with these changes.

Several migrations added. Note that trilby's 0006 migration is
deleted but there's a new 0006; you might have to wind back to
0005 to allow this migration to work. There are dependency
reasons for doing it like this.

In trilby_api.serializers
=========================

NotificationSerializer modified to return about_account.
It also gets immediately monkey-patched to return
notification_type as "type". Rather messy hack,
but StackExchange says this is the way to do it.

In trilby_api.views
===================

Notifications requires authentication(!) and returns
only the authenticated user's notifications.

In tests
========

test_notifications's test_follow fixed. It didn't work
before, despite the claim in commit 37095e; that was wrong
because the results weren't actually being checked.
2019-12-18 18:06:51 +00:00
Marnanel Thurman 0f2192edad bowler_pub.tests.create_remote_person() has a default publicKey field 2019-12-18 17:58:28 +00:00
Marnanel Thurman 37095e6f1d trilby integration with signals so on_follow notifications work.
Test for this passes; moving it to new test_notifications.py.
2019-12-18 16:30:56 +00:00
Marnanel Thurman 3f53925712 trilby_api.models.Notification added.
Serializer and test stub included.

Nothing actually creates Notifications yet, though.
2019-12-07 02:03:38 +00:00
Marnanel Thurman bf5a8bde07 "deleted" signal is sent when a Delete activity is successful.
Tests included.

Also, "alice" in test_signals has been renamed "arthur",
since all the test messages were from HHGTTG anyway.
2019-12-07 01:30:48 +00:00
Marnanel Thurman 81fb007eb0 Added test for the new "updated" signal.
Added test for the "Update" side_effect.
2019-12-01 20:53:44 +00:00
Marnanel Thurman aa7d5c9a68 create() can pass the send_signal flag through to the side_effect routines.
Because of this, the side_effect routines take **kwargs,
as does run_side_effects() in AcObject.

The side_effect routine for Update can update cached data for remote objects.
It doesn't attempt to modify the "id" or "type" fields on any object.

AcObject gains an items() method, by analogy with dicts etc.
It's just syntactic sugar around activity_form.
2019-12-01 20:52:01 +00:00
Marnanel Thurman 9bf422d834 bowler_pub can send "created" signal on creation.
"deleted" and "updated" signals defined but not yet used.

Tests added.
2019-11-28 19:00:09 +00:00
Marnanel Thurman 07647a39eb Version bump to 0.4.1 2019-11-20 19:11:21 +00:00
Marnanel Thurman 781750bdf0 Renamed entire project from "chapeau" to "kepi".
This is because of a name clash in PyPI.
2019-11-20 19:10:10 +00:00
Marnanel Thurman 7356dca4e9 Including all the other chapeau modules in this repository.
Therefore, changing the name of the Django app to chapeau.
2019-10-08 13:30:33 +01:00
Marnanel Thurman 849ceb7cf2 add "localhost" to default settings so users can test easily 2019-10-02 23:32:16 +01:00
Marnanel Thurman 2849c139cb Add standard headers in middleware.
Closes issue 28.
2019-09-30 21:21:34 +01:00
Marnanel Thurman 48739886c3 Defaults added to activity_form of AcItems.
Default language set to "en" rather than "en-gb" to avoid scaring other Fediverse code.
2019-09-21 18:16:23 +01:00
Marnanel Thurman fad1aff083 Media upload settings in settings 2019-09-21 17:09:30 +01:00
Marnanel Thurman 515fc82417 fixme on settings 2019-09-21 16:56:10 +01:00
Marnanel Thurman 4aa77864ac rm CSRF protection, which breaks get/post requests 2019-08-14 14:34:57 +01:00
Marnanel Thurman f2bbfd0f5f STATIC_ROOT in settings 2019-08-14 00:29:40 +01:00
Marnanel Thurman eef4405280 tests.mastodon.test_create passes!
Public collection IDs are now exported from d_k.__init__ as a set.

user['following'] etc are returned as URLs, not paths.

side_effects.create() goes to some trouble to check whether a new object is relevant to us,
and rejects it if it isn't.
2019-08-11 19:44:49 +01:00
Marnanel Thurman e29d083a37 formatting of values in settings.KEPI made consistent throughout 2019-08-10 16:22:36 +01:00
Marnanel Thurman 811e2e1fd9 If local_config doesn't exist, don't worry about it. 2019-08-08 22:28:22 +01:00
Marnanel Thurman 16cd517589 Fixes to settings so that templates get installed properly. 2019-08-08 19:55:32 +01:00
Marnanel Thurman 9d8c60b9c5 local_config is supposed to be local 2019-08-08 19:55:08 +01:00
Marnanel Thurman 910dd83198 kepi/settings.py includes kepi/local_config.py 2019-08-08 19:23:05 +01:00
Marnanel Thurman c99d0a2000 COLLECTION_PATH corrected 2019-07-31 20:41:27 +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 0d6533057a Add TOMBSTONES to settings 2019-07-22 18:01:26 +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 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 42dbc8ecbc kepi/ package renamed to django-kepi/ for consistency 2018-08-06 22:17:14 +01:00
Marnanel Thurman 3c8d81705c Initial commit 2018-08-06 14:44:35 +01:00