Commit graph

671 commits

Author SHA1 Message Date
Matthias Pfefferle
ec822535c9 Follower object should not make any remote calls 2023-04-27 09:57:50 +02:00
Matthias Pfefferle
b8c86915b5 add missing phpdoc 2023-04-26 17:24:27 +02:00
Matthias Pfefferle
0ee1266c30 add sanitize callbacks 2023-04-26 17:23:28 +02:00
Matthias Pfefferle
4a4a06de37 get_follower requires user_id check 2023-04-26 17:22:44 +02:00
Jeremy Herve
bd75603fc7
Remove comment about Jetpack's Photon 2023-04-26 10:47:49 +02:00
Jeremy Herve
e16e119e6c
Switch to general actions and filter
As a result, we will not modify the images within the ActivityPub plugin, but the hooks will allow third-parties to do it on their end.

See discussion: https://github.com/pfefferle/wordpress-activitypub/pull/309#issuecomment-1521488186
2023-04-26 10:45:35 +02:00
Matthias Pfefferle
c70080a0c6
Merge pull request #312 from akirk/protect-img-tags
Protect img tags from replacing mentions
2023-04-26 10:11:15 +02:00
Alex Kirk
98619dc319 Protect img tags from replacing mentions 2023-04-26 10:08:22 +02:00
Matthias Pfefferle
ca646588d2 ignore www subdomain when comparing hosts
fix #290
2023-04-25 20:44:54 +02:00
Matthias Pfefferle
d1f6973d9b re-add mention functionality
not perfect but works as expected
2023-04-25 11:59:08 +02:00
Matthias Pfefferle
55de37b05d
Merge branch 'master' into update/jetpack-photon-filter 2023-04-25 11:41:43 +02:00
Matthias Pfefferle
b2751b4721
Merge pull request #310 from jeherve/update/wp-tested-up-to
Compatibility: mark plugin as compatible with WP 6.2.
2023-04-25 11:32:20 +02:00
Jeremy Herve
6ee59d2a10
Add changelog 2023-04-25 11:04:32 +02:00
Jeremy Herve
2afe74b29b
Compatibility: the plugin is compatible with WP 6.2. 2023-04-25 11:03:33 +02:00
Jeremy Herve
3fa4a7b58e
Add readme entry 2023-04-25 10:56:17 +02:00
Jeremy Herve
da63763ddc
Compat: only disable Jetpack's image CDN via filter
This follows the discussion in #307.

1. Do not disable Jetpack's image CDN in ActivityPub requests by default.
2. Add a new filter, activitypub_images_use_jetpack_image_cdn, that site owners can use to disable Jetpack's Image CDN if they'd like to.
3. Extract image getting into its own method for improved readability.
2023-04-25 10:54:21 +02:00
Matthias Pfefferle
764a091046 fix unit tests 2023-04-25 09:31:28 +02:00
Matthias Pfefferle
377fc94161 php doc 2023-04-25 09:09:07 +02:00
Matthias Pfefferle
84a82c2ac4 added follower model 2023-04-24 20:46:51 +02:00
Matthias Pfefferle
475f4aaea0
Merge pull request #307 from jeherve/fix/photon-images-jetpack-compatibility
Compatibility: do not serve images with Jetpack CDN when active
2023-04-24 14:00:48 +02:00
Jeremy Herve
56d2b7e8be
Update to handle both old and new versions of Jetpack
See https://github.com/Automattic/jetpack/pull/30050/
2023-04-24 09:51:08 +02:00
Jeremy Herve
3f4c44db05
Compatibility: do not serve images with Jetpack CDN when active
When Jetpack's image CDN is active, core calls to retrieve images return an image served by the CDN.

Since Fediverse instances usually fetch and cache the data themselves, we do not need to use the CDN for those images when returned by the ActivityPub plugin. In fact, we really do not want that to happen, as Fediverse instances may get errors when trying to fetch images from the CDN (they may get blocked / rate-limited / ...).

Let's hook into Jetpack's CDN to avoid that.
2023-04-24 09:51:08 +02:00
Matthias Pfefferle
47dc2f72d1 fix "bulk replace" issue 2023-04-24 09:49:06 +02:00
Matthias Pfefferle
77415ef510 Remove "(Fediverse)" 2023-04-23 22:57:03 +02:00
Matthias Pfefferle
28c077e422 Add URL 2023-04-23 22:56:45 +02:00
Alex Kirk
69aa0b9691
Merge pull request #305 from akirk/fix-edge-caching-problems
Fix Edge Caching Problems
2023-04-21 19:58:58 +02:00
Alex Kirk
4ed4d06fd5 Add comment 2023-04-21 17:41:04 +02:00
Alex Kirk
45ae73bb06 Add Vary header 2023-04-21 17:20:48 +02:00
Matthias Pfefferle
ef536cc977 verify requests 2023-04-21 16:40:46 +02:00
Matthias Pfefferle
ebc9b6ac8d naming improvements 2023-04-21 16:34:47 +02:00
Matthias Pfefferle
3c86e94d9a remove followers 2023-04-21 16:25:15 +02:00
Matthias Pfefferle
32194c31df phpDoc 2023-04-21 15:57:49 +02:00
Matthias Pfefferle
734750b796 use collection also for rest endpoints 2023-04-21 15:57:41 +02:00
Matthias Pfefferle
75e9b1e281 deprecate old functions 2023-04-21 15:57:21 +02:00
Matthias Pfefferle
7769d76849 use a taxonomy to save the list of followers 2023-04-21 14:56:22 +02:00
Matthias Pfefferle
804ef25822 count only users that can publish_posts 2023-04-21 08:42:51 +02:00
Matthias Pfefferle
eeb3ba2952 remove unused "use function" 2023-04-20 15:32:38 +02:00
Matthias Pfefferle
c32eec2390 some code cleanup 2023-04-20 15:22:11 +02:00
Matthias Pfefferle
cf426ab8ab
Merge pull request #265 from pfefferle/optimize-publish
optimize publishing
2023-04-20 15:04:34 +02:00
Matthias Pfefferle
15adf639a8
Merge pull request #302 from jeherve/fix/warning-webfinger-no-user 2023-04-10 16:41:40 +02:00
Jeremy Herve
643c47dcb7
Webfinger info: avoid PHP warning when user isn't defined
This should avoid warnings like this one:

```
PHP Warning:  Attempt to read property "user_login" on bool in /var/www/html/wp-content/plugins/activitypub/includes/class-webfinger.php on line 27
```
2023-04-10 13:10:46 +02:00
Matthias Pfefferle
70edb2392f
Merge pull request #297 from Soean/master 2023-03-26 09:32:28 +02:00
Sören Wrede
7d11d3e208 Fix documentation and typos. 2023-03-23 08:35:26 +01:00
Matthias Pfefferle
b88b1e81b8
Merge pull request #296 from pfefferle/improve-readme
improve readme
2023-03-19 15:15:30 +01:00
Matthias Pfefferle
70fe654c95 fix ordered lists 2023-03-19 08:42:33 +01:00
Matthias Pfefferle
becef59452 improve readme
thanks a lot @cavalierlife
2023-03-18 21:59:09 +01:00
Matthias Pfefferle
3c367f8eb1 remove shortcodes that might confuse people 2023-03-15 17:50:22 +01:00
Edward Ficklin
aed033c03e nonce verification 2023-03-14 20:47:30 -04:00
Edward Ficklin
8b92e9d47e escape output 2023-03-14 20:35:14 -04:00
Edward Ficklin
135e827e54 Merge branch 'master' into feature/165/fediverse-biography 2023-03-14 13:41:39 -04:00