Commit graph

828 commits

Author SHA1 Message Date
Matthias Pfefferle
0bb448964b
added screen-reader-text (#792) 2024-07-01 12:30:16 +02:00
Matthias Pfefferle
0be726983e Merge branch 'master' of https://github.com/Automattic/wordpress-activitypub 2024-06-17 12:37:45 +02:00
Matthias Pfefferle
dab261826b fix redirect issue 2024-06-17 12:37:43 +02:00
Matt Wiebe
a08b33361a
Add count_total=false to WP_User_Query (#781) 2024-06-11 10:47:42 -05:00
Matthias Pfefferle
02678eeec3 fix some WebFinger issues 2024-06-09 14:48:31 +02:00
Matthias Pfefferle
3d1bf1b01b fix content type 2024-06-07 19:59:02 +02:00
Matthias Pfefferle
e21b8828c6 Add cors header 2024-06-07 19:04:53 +02:00
Matthias Pfefferle
72c2bfc572 send also announces for deletes 2024-06-07 14:55:17 +02:00
Matthias Pfefferle
06b6cd467c
Add follower count to "At a Glance" dashboard widget (#774)
* add follower count to "At a glance" dashboard widget

* add `number_format_i18n` function

* add decimal_point support

and load only on dashboard

* Update includes/class-admin.php

Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>

* Update includes/class-admin.php

Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>

* Update includes/class-admin.php

Co-authored-by: Alex Kirk <akirk@users.noreply.github.com>

* added changes suggested by @jeherve

* add `get_plugin_version()` to all enqueues

---------

Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
Co-authored-by: Alex Kirk <akirk@users.noreply.github.com>
2024-06-04 15:22:20 +02:00
Matthias Pfefferle
5ddeaac7e0
better conneg handling (#775) 2024-06-04 12:11:10 +02:00
Matthias Pfefferle
2d62cbf171 be sure to add a trailing slash 2024-06-03 11:02:51 +02:00
Matthias Pfefferle
8e7935f992
Add podcast support (#754)
* generic enclosure support

* prioritise media!

* prioritise media

* get_enclosures function

* remove unneeded check!

* some improvements

* formatting

---------

Co-authored-by: Matt Wiebe <wiebe@automattic.com>
2024-06-01 11:12:42 +02:00
Matt Wiebe
4f7a37aa7f appease the linter 2024-05-29 13:18:27 -05:00
Matthias Pfefferle
b27d4d3c36
always fall back to get_by_username if one of the above fail (#764) 2024-05-21 15:01:30 +02:00
Matt Wiebe
89a57302c6
Notifications: introduce general class and use it for new follows (#761)
* Notifications: introduce general class and use it for new follows

Also send stuff via Jetpack

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-05-16 16:03:03 -05:00
Matthias Pfefferle
3fde5bbe96
Improve lemmy compatibility (#752)
* improve lemmy compatibility

* simplify code

* fix tests

* use string instead of array

* use `actors` instead of `users`

* optimize ID generation

* update ID

* the #threadiverse needs Announces for everything! :)

* change to full Announce Object

* fix indents
2024-05-16 17:30:08 +02:00
Jan Boddez
2b96c6efd2
Improve transformer (#731)
* Factory::get_transformer() may return a WP_Error instance

* Fix templates

* PHPDoc

* "Fix" conneg (for posts, at least)

* (Hopefully) fix conneg for comments, too

* Ugly, but works?

* Fix outboxes, collections

* Clean up a bit

* Use Factory

* Remove outdated `use`

* Use Transformer\Factory instead of Transformer\Post

* "Fix" _deprecated_function() call

* Remove superfluous transformer check

* Remove transformer check

* Call Transformer::get_transformer() only once per request

* PHPDoc

* this should be fine

a failing transformer is very unlikely because there are a lot of checks before `is_singular` or `is_comment` is valid.

* no longer used

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-05-16 15:14:31 +02:00
Matt Wiebe
8bf37f78ef
Prevent infinite loops in get_comment_ancestors (#758) 2024-05-10 10:18:22 -05:00
Matt Wiebe
9e57681701
Only send Mentions to comments in the direct hierarchy (#740)
* add generic get_comment_ancestors function

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-05-03 12:42:07 -05:00
Matthias Pfefferle
f0c52580ff
Improve AUTHORIZED_FETCH (#728)
* simplify code

* show limited profile informations

* exclude application user

* use actor instead of user

* change JS

* use Application instead of Application_User

* re-add use

* add summary

* Improves comment intent

* remove limited actor json in favour of the application user

---------

Co-authored-by: Django Doucet <mediaformat.ux@gmail.com>
2024-05-03 08:54:06 +02:00
Matthias Pfefferle
0d2ce1afb3
Fix funkwhale links (#753)
* fix funkwhale links

* already done by object_to_uri

* fix lemmy @-replies
2024-05-03 08:52:02 +02:00
Matthias Pfefferle
60d6be00c3
Improve attachment handling (#751) 2024-05-02 22:14:28 +02:00
Matthias Pfefferle
cdd303cea6
Fix blog-wide account when WordPress is in subdirectory (#744)
* add broken tests

to fix them

* respect subpathes
2024-05-02 14:59:57 +02:00
Matthias Pfefferle
74403ff37f
Basic Announce support (#747)
* Basic Announce support

* fix namespace issue

* add missing function declaration
2024-05-02 10:13:34 +02:00
Django
dd5aa9ba5f
Adds a core/embed block filter to transform iframes to links (#750)
* Add function to transform outgoing embed/iframe to simple url

* Fix descriptions and code style

* filter content for core/embed blocks

* some re-arranges

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-05-02 09:39:25 +02:00
Matthias Pfefferle
119bab3cb4
Always use Note as default (#738) 2024-04-29 12:09:58 +02:00
Matthias Pfefferle
6c90990aaf
Some fixes to be compatible with discourse (#736)
* some fixes to be compatible with discourse

* always handle actors objects
2024-04-26 14:59:45 +02:00
Matthias Pfefferle
6e374b716a do not announce replies 2024-04-25 20:56:22 +02:00
Matt Wiebe
d173690d7b
Generate comment IDs for federation from home_url (#739)
* Generate comment IDs for federation from `home_url`

`site_url` is used for the WP install, not for the frontend URLs

* fix other `site_url` uses
2024-04-25 14:32:51 +02:00
Matthias Pfefferle
d94d064acb fix #734 2024-04-23 08:47:35 +02:00
Matthias Pfefferle
eb23a8a867 fix #732 2024-04-22 15:32:53 +02:00
Matthias Pfefferle
9a5beb1885 check Author-URL only if user is enabled for ActivityPub
thanks @cybeardjm
2024-04-19 13:43:09 +02:00
Matthias Pfefferle
f4adecddf6 also delete interactions with this person! 2024-04-18 18:08:01 +02:00
Alex Kirk
60f0668677
Enable Mastodon Apps: Add remote outbox fetching (#717)
* Add remote outbox fetching

* Fix linting

* reformatting

* Use the HTTP::get function and introduce caching

* Update includes/class-http.php

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* Update includes/class-http.php

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* Use use

* fix indents

* Check for an existing blurhash

* I think this is easier

* Add more error checking

* Remove debug code

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-04-18 11:13:55 +02:00
Matt Wiebe
848055c6a5
Remote Reply: limit enqueue to when needed (#725) 2024-04-11 09:08:08 +02:00
André Menrath
c67ef1b658
fix outbox collection for blog and application user (#724) 2024-04-10 08:36:51 +02:00
Matthias Pfefferle
2f66566f58 improve remote reply handling
see #720
2024-04-09 13:18:49 +02:00
Matthias Pfefferle
0cd1cdd4e8 remove remote_reply_assets_needed check
I had to remove the `remote_reply_assets_needed` check introduced in #706 because it removed the JS completely on my test machine
2024-04-08 10:07:55 +02:00
Matthias Pfefferle
be3f754a25
mask version number (#719) 2024-04-05 15:49:38 -05:00
Matthias Pfefferle
a3189a0f4c small improvements 2024-04-05 13:49:57 +02:00
Matthias Pfefferle
4132fdb501 fix excerpt length 2024-04-05 12:44:18 +02:00
Matthias Pfefferle
3bbcc2cd5c fix version numbers 2024-04-05 10:44:33 +02:00
Matt Wiebe
7ae3e7383d
Comment reply federation: support is_single_user sites (#712)
* Comment reply federation: support `is_single_user` sites

* Use the `activitypub` capability

* Use `publish_posts`

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>

* No need to convert to Blog User, happens implicitly

* Other cap instance, update comment

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-04-04 23:16:05 +02:00
André Menrath
68e1a6bb9b
don't set a default actor type in the actor class (#713)
fixes that the get_type function is not called for extended classes.

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-03-27 17:57:14 +01:00
Matt Wiebe
9e676e6339
Federated replies: improved UX for "your reply will federate" (#715)
* Federated replies: improved UX for understanding that your reply will federate

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-03-26 15:41:23 -05:00
Matthias Pfefferle
85aa63e9f2 fix counter for system users 2024-03-26 15:26:26 +01:00
Matthias Pfefferle
7ca9c2bbfa fix #714 2024-03-26 15:22:21 +01:00
Matthias Pfefferle
8c245ceae1 oops 2024-03-22 12:04:22 +01:00
Matthias Pfefferle
a8948fad4f do not show if Webmention is installed 2024-03-22 11:58:50 +01:00
Matthias Pfefferle
a1c7bc06cc Add some comment infos 2024-03-22 11:53:57 +01:00