Wykres commitów

26 Commity (61748597220ba873307f53b7ce0bc853fed8c76f)

Autor SHA1 Wiadomość Data
Marnanel Thurman 37d53b2e4e Status.content and Status.spoiler_text are now Status.content_source and Status.spoiler_source.
HTML renderings of each one are cached. You can access them at Status.content_as_html
and Status.spoiler_as_html.
2021-02-16 22:58:42 +00:00
Marnanel Thurman 731cb3e21e trilby doesn't need to return mentions, at least not for now 2020-10-29 17:58:50 +00:00
Marnanel Thurman 7368f2c372 serializers.py header 2020-08-25 15:50:25 +01:00
Marnanel Thurman a4fa15e825 The Mastodon response to in_reply_to_account_id defaults to None.
This fixes a test failure.
2020-08-23 16:40:49 +01:00
Marnanel Thurman 575cb0df17 Fixing up ActivityPub access to collections, and particularly to outboxes.
Partial checkin.
2020-06-11 19:07:55 +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 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 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 7a4a278f0e user "id" field is an int 2020-04-23 19:38:18 +01:00
Marnanel Thurman c041b67fcb "reblog" in StatusSerializer becomes a RecursiveField 2020-04-15 18:24:02 +01:00
Marnanel Thurman de6c79b073 get context working 2020-04-14 17:54:52 +01:00
Marnanel Thurman 5b012e0f6c intermediate 2020-03-31 02:11:57 +01:00
Marnanel Thurman b7725aaac7 intermediate 2020-03-29 17:48:46 +01:00
Marnanel Thurman 136c013879 intermediate 2020-03-28 18:32:25 +00:00
Marnanel Thurman b4232323cc intermediate 2020-03-28 17:44:25 +00:00
Marnanel Thurman eadd90431e intermediate 2020-03-23 00:59:28 +00:00
Marnanel Thurman b7ab7cdf84 intermediate 2020-03-21 18:49:27 +00:00
Marnanel Thurman 600d13d4f5 intermediate 2020-03-20 15:47:05 +00:00
Marnanel Thurman e07706865e Intermediate checkin 2020-03-16 17:54:02 +00:00
Marnanel Thurman 2bc69c1250 The "serial" field of bowler_pub's AcItem moves up to AcObject;
all objects, remote and local, now have serial numbers.

This is partly to make it easier for trilby_api to provide
decimal "id" numbers, and partly so that status URLs can contain
monotonically increasing decimal numbers. This last part
has not yet been implemented; status URLs still contain the
hex ID of the status.

It's possible that we can simplify this design a bit;
we should think about refactoring.

The regexp for local hex numbers is renamed to LOCAL_NUMBER_REGEXP
because it used to contain the word "SERIAL", which was misleading.

trilby_api now returns the "serial" field as "id"; see above.

Tests updated.
2020-02-04 01:38:54 +00:00
Marnanel Thurman 4f57cc3b90 Statuses returned via the Mastodon API always have IDs which are
decimal integer strings.

This is to keep Tusky etc happy. See
https://socialhub.activitypub.rocks/t/verify-credentials-im-doing-something-wrong-here/440/3
2020-02-02 00:58:08 +00:00
Marnanel Thurman fa6e49bf43 Mastodon's notifications give a dict for account and status, not just their ID 2019-12-19 18:51:17 +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 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 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