kopia lustrzana https://gitlab.com/jaywink/federation
Changelogs for changes
rodzic
cf790f8b92
commit
2be12c356d
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -2,10 +2,29 @@
|
|||
|
||||
## [0.18.0-dev] - unreleased
|
||||
|
||||
### Added
|
||||
|
||||
* Work has started on ActivityPub support 🎉
|
||||
|
||||
### Changed
|
||||
|
||||
* **Backwards incompatible.** Lowest compatible Python version is now 3.6.
|
||||
|
||||
* **Backwards incompatible.** Internal refactoring to allow adding ActivityPub support as the second supported protocol. Highlights of changes below.
|
||||
|
||||
* Reversal of all the work previously done to use Diaspora URL format identifiers. Working with the Diaspora protocol now always requires using handles and GUID's as before the changes introduced in v0.15.0. It ended up impossible to construct a Diaspora URL in all cases in a way that apps only need to store one identifier.
|
||||
* The `id` and possible `target_id` are now either URL format identifiers (ActivityPub) or a handle or GUID (Diaspora, depending on entity). Additionally a new `actor_id` has been added which for ActivityPub is an URL and for Diaspora a handle. Note, Diaspora entities always have also the `guid`, `handle`, `target_guid` and `target_handle` as before v0.15.0, depending on the entity. When creating Diaspora entities, you must pass these in for sending to work.
|
||||
* The high level `fetchers.retrieve_remote_content` signature has changed. It now expects an `id` for fetching from AP protocol and `handle`, `guid` and `entity_type` to fetch from Diaspora. Additionally a `sender_key_fetcher` can be passed in as before to optimize public key fetching using a callable.
|
||||
* The high level `fetchers.retrieve_remote_profile` signature has changed. It now expects an `id` for fetching from AP protocol and `handle` for fetching from Diaspora. Additionally a `sender_key_fetcher` can be passed in as before to optimize public key fetching using a callable.
|
||||
* The generator class `RFC3033Webfinger` now expects instead of an `id` the `handle` and `guid` of the profile.
|
||||
* NodeInfo2 parser now returns the admin user in `handle` format instead of a Diaspora format URL.
|
||||
* The high level inbound and outbound functions `inbound.handle_receive`, `outbound.handle_send` parameter `user` must now receive a `UserType` compatible object. This must have the attributes `id` and `private_key`. If Diaspora support is required then also `handle` and `guid` should exist. The type can be found as a class in `types.UserType`.
|
||||
* The outbound function `outbound.handle_send` parameter `recipients` structure has changed. It must now for Diaspora contain either a `handle` (public delivery) or tuple of `handle, RSAPublicKey, guid` for private delivery. For AP delivery either `url ID` for public delivery or tuple of `url ID, RSAPublicKey` for private delivery.
|
||||
|
||||
### Removed
|
||||
|
||||
* **Backwards incompatible.** Support for Legacy Diaspora payloads have been removed to reduce the amount of code needed to maintain while refactoring for ActivityPub.
|
||||
|
||||
## [0.17.0] - 2018-08-11
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -12,25 +12,6 @@ class DiasporaEntityMixin:
|
|||
# Normally outbound document is generated from entity. Store one here if at some point we already have a doc
|
||||
outbound_doc = None
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# handle = kwargs.get('handle')
|
||||
# guid = kwargs.get('guid')
|
||||
# id = kwargs.get('id', '')
|
||||
# actor_id = kwargs.get('actor_id', '')
|
||||
# if not handle and not guid:
|
||||
# if id.startswith('diaspora://'):
|
||||
# kwargs['handle'], _type, kwargs['guid'] = parse_diaspora_uri(id)
|
||||
# elif actor_id.startswith('diaspora://'):
|
||||
# kwargs['handle'], _type, kwargs['guid'] = parse_diaspora_uri(actor_id)
|
||||
#
|
||||
# target_handle = kwargs.get('target_handle')
|
||||
# target_guid = kwargs.get('target_guid')
|
||||
# target_id = kwargs.get('target_id', '')
|
||||
# if not target_handle and not target_guid and target_id.startswith('diaspora://'):
|
||||
# kwargs['target_handle'], _type, kwargs['target_guid'] = parse_diaspora_uri(target_id)
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def extract_mentions(self):
|
||||
"""
|
||||
Extract mentions from an entity with ``raw_content``.
|
||||
|
|
Ładowanie…
Reference in New Issue