Commit graph

918 commits

Author SHA1 Message Date
Matt Wiebe
0625090989
Fix link regex (#922)
* Fix link regex

* add some tests

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-07 13:25:32 +02:00
Matthias Pfefferle
9b0d5857c1 check for WP_Error 2024-10-07 10:03:40 +02:00
Konstantin Obenland
2538a2f1b7
PHPCS: Enable UnusedFunctionParameter sniff (#911)
* PHPCS: Enable UnusedFunctionParameter sniff

* Add unit test for at_title shortcode

* Remove unused variables in at_title shortcode

* Remove remaining unused function parameters.

* PHPCS: Enable UnusedVariable sniff (#912)

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-04 11:28:31 -05:00
Konstantin Obenland
a2e7729d4d
PHPCS: Enable NoReservedKeywordParameterNames sniff (#909)
* PHPCS: Enable NoReservedKeywordParameterNames sniff

* Fix parameter doc

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

* Rename to $data since the type is ambiguous

Props @pfefferle.

* Name it $uri for consistency

Props @pfefferle.

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-03 10:19:06 -05:00
André Menrath
e68e623051
fix phpdoc return type for transformer factory's get_transformer (#921) 2024-10-02 19:03:17 +02:00
Matthias Pfefferle
1af17c4b1d
Prepare multi-lang support (#919)
This PR adds Maps for "name" (title) and "summary".
2024-10-02 18:47:20 +02:00
Matthias Pfefferle
a2d6b9dc8e
fix #871 (#920) 2024-10-02 18:46:52 +02:00
Konstantin Obenland
711217715c
PHPCS: Enable CommentedOutCode sniff (#914) 2024-09-30 12:08:18 +02:00
Konstantin Obenland
cefed604ce
PHPCS: Enable LongNotCapital sniff (#913) 2024-09-30 12:07:52 +02:00
Konstantin Obenland
f40905dd85
PHPCS: Enable GetMetaSingle sniff (#907) 2024-09-30 12:06:59 +02:00
Matthias Pfefferle
d7bc9c78a0 fixed fatal error if remote-object is WP_Error 2024-09-30 09:24:11 +02:00
Konstantin Obenland
91a3799a4d
PHPCS: Enable NotPrepared check (#906) 2024-09-29 16:12:31 -05:00
Konstantin Obenland
f84683be1a
PHPCS: Enable NonceVerification sniff (#908) 2024-09-29 16:12:01 -05:00
Konstantin Obenland
7a19d7377f
PHPCS: Enable MissingShort Sniff (#910) 2024-09-29 16:11:21 -05:00
Konstantin Obenland
2b5f635ba3
Suggestion: Adopt WordPress PHP Coding Standards (#905)
* Update phpcs rules

* Automated style updates

* Silence all other Warnings and Errors

We'll fix them in follow ups.
2024-09-28 12:53:21 -05:00
Matthias Pfefferle
f5989f0380
Keep priority of Icons (only change fallbacks) (#903)
* keep icon prio the same as before

and only replace the icon, because we can not assume that a logo is always square!?!

* remove logo completely
2024-09-26 18:09:19 +02:00
Matt Wiebe
b469c23220
wpcom wants anonymous functions like this (#901) 2024-09-25 14:29:55 -05:00
Matthias Pfefferle
62e7a2b489 ooops 2024-09-25 19:59:06 +02:00
Matt Wiebe
de85cca894
Content warnings! (#900)
* Allow content warning

* build files

* added missing namespace

* fix tests

* actors does not support sensitive (yet).

* Update includes/functions.php

* added `sanitize_callback`

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-09-25 17:22:51 +02:00
André Menrath
7370e97b5a
Add replies collection (#876)
* typo in phpdoc

* add first draft for adding replies collections to posts and comments

* refactoring

* Fix php CodeSniffer violations

* fix typo in php comment

* add draft for testing replies

* replies: test with own comment

* fix basic test for replies collection

* Restrict 'type' parameter for replies to 'post' or 'comment' in REST API

* some cleanups

* prefer ID over URL

* rename to `reply_id` to make clear that it is not the WordPress comment_id

* modularize retrieving of comment link via comment meta

* fix phpcs

* I think we should be more precise with this

and maybe there are other fallbacks coming

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-09-25 13:24:35 +02:00
Matthias Pfefferle
d361a6954d
fix missing @ in Follow-Me block (#898) 2024-09-23 22:44:24 +02:00
Matt Wiebe
99295715e3
Enable Mastodon Apps: support profile editing, blog user (#788)
---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-09-23 10:36:16 -05:00
Matt Wiebe
18da65ff29
Follow Me/Followers: add inherit mode for dynamic templating (#892)
---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
Co-authored-by: Alex Kirk <akirk@users.noreply.github.com>
2024-09-19 15:29:12 -05:00
Alex Kirk
9d1decf582
Be more defensive when openssl (#895) 2024-09-18 14:46:00 +02:00
Matthias Pfefferle
b913400895 fix issue that federated comments will not be threaded properly 2024-09-17 11:22:22 +02:00
Matthias Pfefferle
36610f5d75
Improve Validation (#847)
* initial

* re add authorisation request

* remove unnecessary checks

* validate object

* these checks are done by the inbox now

* only handle activitypub requests
2024-09-16 16:57:33 +02:00
Matthias Pfefferle
2729f2f0e1
It seems that Mastodon has issues with HTML in summaries (#893)
Fixes: https://github.com/mastodon/mastodon/issues/28455

Until this is merged: https://github.com/mastodon/mastodon/pull/28629
2024-09-15 09:58:27 +02:00
Matthias Pfefferle
8bff92d260
initial (#867) 2024-09-13 18:21:11 +02:00
Matthias Pfefferle
ad99fdaae4 use is_blog_public 2024-09-12 16:55:14 +02:00
Matthias Pfefferle
7c44c947a8 Use Article as default 2024-09-11 10:36:13 +02:00
Matthias Pfefferle
95c4430d6e
Improve Accessibility for Reply-Context (#885)
fix #875
2024-09-10 08:46:17 +02:00
Matthias Pfefferle
7da5bc66ae fix nodeinfo endpoint 2024-09-09 13:34:33 +02:00
Matthias Pfefferle
c180644ccc
Fix Extra-Fields handling (#886) 2024-09-09 12:54:57 +02:00
Matthias Pfefferle
2fe359c844 add fediverse symbol
https://symbol.fediverse.info/
2024-09-05 10:50:03 +02:00
André Menrath
d577dc0d0d
Fix: wrong followers URL in "to" attribute of posts (#874)
* draft that shows potentially right behavior for what is set on the to attribute on posts

* use Actor Object instead

* reformat

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-09-05 10:36:37 +02:00
Matthias Pfefferle
57299fc131
Add "Stream" Plugin support (#863)
* Add "Stream" Plugin support

This PR adds support for the Stream Plugin. It maps the Notifications to the Stream plugin, that might help us with debugging.

* send type specific notification action

...to be able to subscribe to only a certain type of notifications.
2024-09-04 15:25:23 +02:00
Matthias Pfefferle
88675ea6c6
Simple Remote-Reply endpoint. (#866)
* Simple Remote-Comment endpoint.

implements #864

* move sanitize to args

* fix PHPDoc

* change from actions to filters

thanks @akirk for your feedback!

* add generic Interaction hook
2024-09-04 13:37:38 +02:00
Matthias Pfefferle
b52c079299 remove proprietary WebFinger resource 2024-08-20 11:53:27 +02:00
Matthias Pfefferle
0b45628a65 ignore phpcs warning 2024-08-19 12:35:31 +02:00
Matthias Pfefferle
ef00eab0ea exclude likes and announces from comments 2024-08-19 00:57:56 +02:00
Matthias Pfefferle
a482c90069 show avatars on likes and announces
thanks @janboddez
2024-08-18 22:59:33 +02:00
Matthias Pfefferle
7a19bdea17 log inbox requests 2024-08-17 20:17:47 +02:00
Matthias Pfefferle
46db44768c fix undo for likes and announces 2024-08-16 14:12:15 +02:00
Jan Boddez
dabff80cc2
Add like handler (#804)
* Update class-comment.php

* Initial attempt

* Register like handler

* Add support for undoing likes

* add support for announce

and copied basic comment_type support handling from the Webmention plugin

* fix merge issues

* remove C&P issues

* add missing phpdoc

* Disable Announces and Likes by default.

* set ACTIVITYPUB_DISABLE_REACTIONS to false

* refactorings

* fix escaping

* add default object type

* deduplicate code

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-08-16 12:55:16 +02:00
Matthias Pfefferle
7806285d88
Support "read more" for Activity-Summary (#856)
* Support "read more" for Activity-Summary

* add support for excerpt

* use the same function also for the shortcode

* add mentions, hashtags and links support to `the_excerpt`

* do not make unnecessary extra db calls

* fall back to default if options is empty

* remove unused hook

* some fixes

and improvements based on the feedback of @MatzeKitt

* add phpdoc

* also extract hashtags from excerpt

* use filter, so that it is possible to also support mentions

and maybe tags in the future

* Add PHPDoc

* simplify code

* fix test
2024-08-16 12:53:14 +02:00
Matthias Pfefferle
caecaf3c47 always use print_r 2024-08-16 10:46:11 +02:00
Daniel Hüsken
dd8f363c35
fix link detection for extra fields when spaces after the link and fix when two links in the content (#857) 2024-08-14 16:32:26 +02:00
Matthias Pfefferle
b160961a90 unification 2024-08-14 15:50:39 +02:00
Daniel Hüsken
2ac7676359
Replace hashtags, urls and mentions in summary with links (#849)
* replace hashtags, mentions and ulrs in summary

* move faq stuff and auto generate markdown version with grunt

* I would rename it the class to `Link` because it's about linking not about URLs

* fix auto generated readme

* let use not converted links in extra fields our link generation

* consistency

* find new function name, because it is not purely about links

* make `rel` directly filterable to be more flexible in the future

* remove some whitespaces

* it is not needed to check for a link inside a link

* not convert extra field links with additional text

* not convert extra field links with additional text

* simplified code

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-08-14 15:41:42 +02:00
Matthias Pfefferle
1b85b77347
Hide Bookmarklet if site does not support Blocks (#851) 2024-08-13 00:34:56 +02:00