Wykres commitów

698 Commity (jsonld-processing)

Autor SHA1 Wiadomość Data
Jason Robinson 890e2c940b Make UserType an attrs class 2018-08-19 22:02:09 +03:00
Jason Robinson 7d78122cbc Call get contact key with sender id, not handle 2018-08-19 20:05:03 +03:00
Jason Robinson fd6f24ad34 Correct attribute _receiving_actor_id on BaseEntity 2018-08-12 19:42:22 +03:00
Jason Robinson 4c24e57bff Make retrieve_remote_profile accept an ID 2018-08-12 17:58:59 +03:00
Jason Robinson d2cba74a9d Revert: WIP 2018-08-12 00:31:20 +03:00
Jason Robinson f744c6635d Fix type hinting problems due to pycryptodome move 2018-08-11 23:56:46 +03:00
Jason Robinson cbf2e1f99c WIP 2018-08-11 23:41:15 +03:00
Jason Robinson db049c6638 Fix RSA object usage in type hints
It seems little-boxes replaced our crypto library which caused
a bit of a mayhem since some of the internal objects don't match.
If we need that library after all, will need to drop these type
hints.
2018-08-11 23:41:15 +03:00
Jason Robinson dc988add94 Add pytest-blockage 2018-08-11 23:41:15 +03:00
Jason Robinson 16e1b69061 Create top level Django url config and utilities 2018-08-11 23:41:15 +03:00
Jason Robinson 570f7c6007 Create first ActivityPub entity version, ActivitypubProfile
Corresponds to 'Person' Actor.
2018-08-11 23:41:15 +03:00
Jason Robinson 493ee7bf22 Refactoring of diaspora protocol support to use ID's everywhere
Entities no longer have `handle` or `guid`, `target_guid` or
`target_handle` attributes. These are
now properties on the Diaspora entities only. For working with
entities, the new URI based attributes should be used. These are
`id`, `target_id` and `actor_id`. Depending on entity type, some
of these will be required while some not (just like with handle,
guid, target_guid and target_handle before).

All high level methods now expect ID's and return ID's for everything.
Internally the diaspora protocol still works with handle's and guid's.

This opens adding ActivityPub which works with URI ID's everywhere.
2018-08-11 23:41:15 +03:00
Jason Robinson a464383c63 Move get_base_utils helper to entity base utils 2018-08-11 23:41:15 +03:00
Jason Robinson 3bf4f01575 Remove support for legacy Diaspora protocol
Support for Request and the old structure of Diaspora protocol
elements and delivery has been removed. A near 100% majority of
known users using the Diaspora protocol have upgraded past versions
where the new entities came into use.
2018-08-11 23:41:15 +03:00
Jason Robinson 55985ae076 Merge branch 'patch-017' into 'master'
Switch crypto library `pycrypto` to `pycryptodome`

See merge request jaywink/federation!130
2018-08-11 20:40:53 +00:00
Jason Robinson 5a01616df1 Fix references to code to point to Feneas gitlab 2018-08-11 22:32:44 +03:00
Jason Robinson 258a067412 Merge branch 'master' into patch-017 2018-08-11 21:50:35 +03:00
Jason Robinson bc38ac990b Switch crypto library `pycrypto` to `pycryptodome`
This is a more up to date fork of the former. This fixes CVE-2018-6594 found in the former.

**Deployment note.** When updating an application, you *must* uninstall `pycrypto` first, otherwise there will be a conflict if both the versions are installed at the same time. To uninstall, do `pip uninstall pycrypto`.

Release 0.17.0
2018-08-11 21:47:16 +03:00
Jason Robinson 674e242519 Remove travis config 2018-07-23 23:21:33 +03:00
Jason Robinson 065c8594b6 Merge branch 'python36' into 'master'
Drop support for Python <= 3.5, add tox and Gitlab CI

See merge request jaywink/federation!128
2018-07-23 16:27:15 +00:00
Jason Robinson a2e08d42f5 One more place to bump Python version in docs 2018-07-23 19:21:58 +03:00
Jason Robinson bb3281d489 Add tox and gitlab CI 2018-07-23 19:15:34 +03:00
Jason Robinson 454dc8ccbc Drop compatibility for Python <= 3.5 2018-07-23 18:33:47 +03:00
Jason Robinson 6cbe9cee9d Start new development cycle 2018-07-23 18:32:54 +03:00
Jason Robinson afee56cac6 Release 0.16.0 2018-07-23 16:28:08 +03:00
Jason Robinson bfb4792f16 Fix Diaspora `Profile` mapping regarding `last_name` property
Previously only `first_name` was used when creating the `Profile.name`
value. Now both `first_name` and `last_name` are used.

When creating outgoing payloads, the `Profile.name` will still be placed
in `first_name` to avoid trying to artificially split it.
2018-06-24 22:12:43 +03:00
Jason Robinson 690e8872d8
Merge pull request #127 from jaywink/extract-mentions
Extract mentions from Diaspora payloads that have text content
2018-06-24 00:13:49 +03:00
Jason Robinson af920604a2 Extract mentions from Diaspora payloads that have text content
The mentions will be available in the entity as `_mentions` which is
a set of Diaspora ID's in URI format.
2018-06-23 23:09:18 +03:00
Jason Robinson 8c7b1206c6 Monthly and halfyear active users from weekly should not be more than total user count 2018-06-05 23:03:33 +03:00
Jason Robinson b28661b86a Revert previous attempt for Mastodon weekly stats stabilizing
Instead, take a stable number from previous week stats for now.
2018-06-04 23:52:40 +03:00
Jason Robinson 907d1d60db Try stabilizing Mastodon weekly counts with more guessing
Mastodon has a tricky way of reporting weekly logins according to the
going week. Multiply the count depending on the weekday to see if we
can stabilize the stats a bit.
2018-06-04 22:59:49 +03:00
Jason Robinson 8111f2d4e4 Fix Mastodon parser if version has non-numbers 2018-06-04 20:43:46 +03:00
Jason Robinson 7a328459ba
Merge pull request #126 from jaywink/improve-country-parsing
Switch to ipdata.co service for country lookups
2018-05-27 21:21:47 +03:00
Jason Robinson a2c8d1c061 Switch to ipdata.co service for country lookups 2018-05-27 20:34:47 +03:00
Jason Robinson 5e3e363714
Merge pull request #125 from jaywink/mastodon-parser
Add parser for Mastodon server info and activity documents
2018-05-27 01:58:05 +03:00
Jason Robinson 6353e47a85 Add parser for Mastodon server info and activity documents 2018-05-27 01:46:55 +03:00
Jason Robinson a42fd1631d Don't allow negative values in meta doc usage numbers 2018-05-13 23:06:41 +03:00
Jason Robinson 5a5042a97d Don't crash meta fetchers if no JSON returned 2018-05-13 22:57:33 +03:00
Jason Robinson 07fa3e8f19 More support for old buggy Hubzilla nodeinfo docs 2018-05-13 22:36:00 +03:00
Jason Robinson 2762fb5f3e Guard against 'null' values in NodeInfo2 documents 2018-05-13 22:14:33 +03:00
Jason Robinson 1066502591 Add workaround for parsing a buggy older Hubzilla version nodeinfo
This has been fixed in later versions but there are quite a few
versions out with the bug so add a workaround to not crash on those.
2018-05-13 20:47:55 +03:00
Jason Robinson 7590e65f79 Don't automatically fetch ip and country when parsing meta docs
Otherwise we spam the country providing service too much.
2018-05-10 11:48:55 +03:00
Jason Robinson af86d9a9a4
Merge pull request #124 from jaywink/wip
Add fetching of IP and country
2018-05-07 23:08:06 +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 0da0e58693 Make statisticsjson hostmeta parser more resilient
Some servers use strings for number values.
2018-04-26 22:30:28 +03:00
Jason Robinson 2c255a68f7 Change hostmeta fetchers relay default to empty string 2018-04-08 20:20:24 +03:00
Jason Robinson 3bf19d2a8b
Merge pull request #123 from jaywink/nodeinfo2
Add NodeInfo2 generator and Django view
2018-04-08 15:15:58 +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 a798b1d4b5
Merge pull request #122 from jaywink/server-meta-parsers
Add fetchers for nodeinfo, nodeinfo2 and statisticsjson
2018-04-08 13:30:35 +03:00
Jason Robinson eef1f7d820 Add fetchers for nodeinfo, nodeinfo2 and statisticsjson 2018-04-08 12:57:08 +03:00