Wykres commitów

45 Commity (48be2cbb6e9fa73c916a5e3ec68ed0599822a6b5)

Autor SHA1 Wiadomość Data
Jason Robinson 48be2cbb6e Add `federation.hostmeta` generators for Matrix client and server well-known files.
Django views and url configuration also included for convenience.
2020-12-20 17:55:01 +02:00
Jason Robinson 836e19b40d Remove the network utils `fetch_host_ip_and_country` and `fetch_country_by_ip`
The library that was used starting to require an API key.
2020-12-20 02:59:17 +02:00
Jason Robinson 5ab541440d Clarify usage of the configuration `get_profile_function`
Must be keyword arguments.
2020-01-18 02:17:35 +02:00
Jason Robinson c479a42d47 Entities with a `raw_content` field now have URL syntax mentions rendered into a link
If Django is configured, a profile will be retrieved using the configured profile
getter function and the profile name or username will be used for the link.

Refs: https://git.feneas.org/socialhome/socialhome/issues/572
2020-01-18 01:39:44 +02:00
Jason Robinson e39896b958 Forgot to ensure ActivityPub support is always on. Release 0.18.1. 2019-10-06 15:03:52 +03:00
Jason Robinson c90d8a72e0 Some clarifications for the docs and readme 2019-10-06 01:57:24 +03:00
Jason Robinson c5297fd940 Fix small error in docs 2019-09-08 23:08:18 +03:00
Jason Robinson 2ff4e24821 Add some extra documentation on how certain protocol features are handled 2019-09-08 22:48:47 +03:00
Jason Robinson 7dad9c8109 Add tags found on raw_content when sending ActivityPub entities
Tags are added as "type: Hashtag" objects into the payload object.

Refs: https://git.feneas.org/socialhome/socialhome/issues/522
2019-09-03 22:51:41 +03:00
Jason Robinson ed0b6c21e9 Add docs for the content/source HTML/Markdown rules 2019-08-26 22:24:09 +03:00
Jason Robinson b0c6be6cd7 Add pyfed:inlineImage property to ActivityPub attachments
If we rip out embedded images from raw_content then mark them as
pyfed:inlineImage. Receiving side will know then that those
attachments are included as inline images should they wish to
exclude those, if they support inline images via markdown or html.

Also rip out all embedded images, not just the ones from the
senders domain.
2019-08-18 21:43:27 +03:00
Jason Robinson e670f882f8 Fix and document the pyfed namespace 2019-08-18 19:56:08 +03:00
Jason Robinson b03be01e59 Add more notes about ActivityPub support status to docs 2019-08-17 18:25:38 +03:00
Jason Robinson 353ae9ff9d Add Accept entity and ActivityPub follow auto-Accept flow
When receiving an ActivityPub Follow, send back an Accept activity
automatically. Due to application hook needed to fetch sending
user private key (for signing), this is only available if Django
is installed since currently application hooks exist only for
Django configuration.

Django applications should include a new configuration item
"get_private_key_function" which points to a function which takes
a user identifier (fid, handle or guid) and returns a private key
in RSA object format.
2019-03-17 03:17:10 +02:00
Jason Robinson c3f59e832e Change activitypub_object_view get_object_function call signature
Pass now full request object instead of the object ID. This allows
the app to check permissions for the object.
2018-10-10 22:43:17 +03:00
Jason Robinson 6dd20c3521 Simplify process_payload call by passing in just request 2018-10-09 22:53:54 +03:00
Jason Robinson aff1a8e59e Tweak activitypub_object_view process_payload call signature
Now passes `response.content` as is and also passes in the request
object.
2018-10-09 22:46:23 +03:00
Jason Robinson 17c23b3be8 Django activitypub_object_view now processes POST to /inbox/ 2018-10-09 22:24:46 +03:00
Jason Robinson 985b97cc04 Documentation updates regarding ActivityPub and other things 2018-09-30 20:49:55 +03:00
Jason Robinson ceb5d0446e Add support for AS2 document webfinger rel used by Mastodon et al
Also fix reference to RFC by renaming RFC3033 to RFC7033 :P
2018-09-30 16:20:03 +03:00
Jason Robinson cbf2e1f99c WIP 2018-08-11 23:41:15 +03:00
Jason Robinson 5a01616df1 Fix references to code to point to Feneas gitlab 2018-08-11 22:32:44 +03:00
Jason Robinson a2e08d42f5 One more place to bump Python version in docs 2018-07-23 19:21:58 +03:00
Jason Robinson 33c6ed817a Add fetching of IP and country
Network utils has a method `fetch_host_ip_and_country` which will
fetch both. The country fetching uses the `ip-api.com` free service
to resolve country information.
2018-05-07 22:58:25 +03:00
Jason Robinson 435c3d6d43 Add NodeInfo2 generator and Django view
See https://github.com/jaywink/nodeinfo2
2018-04-08 15:02:18 +03:00
Jason Robinson eef1f7d820 Add fetchers for nodeinfo, nodeinfo2 and statisticsjson 2018-04-08 12:57:08 +03:00
Jason Robinson d74aa5290c Add search path to JSON webfinger 2018-02-21 22:21:55 +02:00
Jason Robinson 3730a3d9b8 Make JSON webfinger support webfinger profile url 2018-02-21 19:20:46 +02:00
Jason Robinson f80211b178 Add RFC3033 webfinger generator
Also provided is a Django view and url configuration for easy addition into Django projects. Django is not a hard dependency of this library, usage of the Django view obviously requires installing Django itself. For configuration details see documentation.

Closes #108
2018-02-17 01:38:37 +02:00
Jason Robinson 47f79205f1 Changelog entries for last commits 2018-02-13 23:11:53 +02:00
Jason Robinson a65b040969 Support Diaspora URI scheme
Add 'id' and 'target_id' to Diaspora entities. Refactor retrieve content fetcher to use the Diaspora URI scheme based ID.
2017-10-22 14:40:12 +03:00
Jason Robinson e343369f5b New high level fetcher function retrieve_remote_content
The given ID will be fetched using the correct entity class specific remote endpoint, validated to be from the correct author against their public key and then an instance of the entity class will be constructed and returned.

Also related changes and refactoring:

* New Diaspora protocol helper `federation.utils.diaspora.retrieve_and_parse_content`. See notes regarding the high level fetcher above.
* New Diaspora protocol helper `federation.utils.fetch_public_key`. Given a `handle` as a parameter, will fetch the remote profile and return the `public_key` from it.
* Refactoring for Diaspora `MagicEnvelope` class.
* Diaspora procotol receive flow now uses the `MagicEnvelope` class to verify payloads.
* Diaspora protocol receive flow now fetches the sender public key over the network if a `sender_key_fetcher` function is not passed in. Previously an error would be raised.

Closes #103
2017-10-21 22:04:05 +03:00
Jason Robinson fb2f9d091d Added base entity Share
Maps to a `DiasporaReshare` for the Diaspora protocol.

The `Share` entity supports all the properties that a Diaspora reshare does. Additionally two other properties are supported: `raw_content` and `entity_type`. The former can be used for a "quoted share" case where the sharer adds their own note to the share. The latter can be used to reference the type of object that was shared, to help the receiver, if it is not sharing a `Post` entity. The value must be a base entity class name.

Closes #94
2017-08-22 12:12:47 +03:00
Jason Robinson b5b05444d7 Add missing 'Follow' entity to docs 2017-07-22 00:02:33 +03:00
Jason Robinson fcc38fc850 Minor documentation update 2017-07-05 20:08:24 +03:00
Jason Robinson 8478d3b90c Add handle_send outbound helper
Allows sending a single entity to multiple receivers. Currently public Diaspora entities supported.
2017-05-07 21:28:56 +03:00
Jason Robinson 07d4484077 Add NoSuitableProtocolFoundError to documentation 2017-05-01 18:58:29 +03:00
Jason Robinson 7960e525b5 Fix remaining Social-Federation old name reference in docs 2017-04-08 11:00:06 +03:00
Jason Robinson 11739c8fd2 Fix docs chatroom and support links 2016-10-05 21:52:00 +03:00
Jason Robinson c5becee7fe Rename library to federation
Less typing saves lives.
2016-10-04 22:07:24 +03:00
Jason Robinson 5558f1099d Improve docs and unify with readme 2016-10-04 21:31:58 +03:00
Jason Robinson 667f079942 Improve docs and unify with readme 2016-10-04 21:31:51 +03:00
Jason Robinson a224e658ff Revert "Fix docs version string"
This reverts commit 464f654fd6.
2016-10-03 20:42:59 +03:00
Jason Robinson 464f654fd6 Fix docs version string 2016-10-03 19:56:13 +03:00
Jason Robinson 4edca37168 Init documentation
Closes #34
2016-10-02 23:07:39 +03:00