Commit graph

16 commits

Author SHA1 Message Date
Matthias Pfefferle
ded55bd4df optimize validation 2024-10-09 17:28:56 +02:00
Konstantin Obenland
ef666772ec
PHPCS: Include all files by default (#930)
* PHPCS: Include all files by default

* simplify menu highlighting

* Update includes/transformer/class-factory.php

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

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-09 08:57:13 +02:00
Konstantin Obenland
00a57c39a4
PHPCS: Enable Commenting sniff (#925)
* PHPCS: Enable Commenting sniff

* Apply suggestions from code review

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

* Fix param alignment.

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-10-07 13:25:51 +02: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
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
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
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
Jan Boddez
0daadd109e
Update class-create.php (#801) 2024-07-09 16:32:43 +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
74403ff37f
Basic Announce support (#747)
* Basic Announce support

* fix namespace issue

* add missing function declaration
2024-05-02 10:13:34 +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
223270f2a7 queue only deletes if follower exists 2024-02-10 20:41:47 +01:00
Matthias Pfefferle
1fc6869576
improve federated comments (#645)
* fix some times broken reply context

* revert changes

* add a filter to finally verify if an activity should be send or not

* better local comment handling

do not federate local only comments (fix #652) and hide "reply" link for federated comments

* show JSON only for comments that should be federated!

* fix parent_comment handling

* show external id if exists

* disable "edit comments" for federated comments

* some more doc

* added tests

* fix #658

* allow custom reply link!

* some restructurings

* this will be only a minor release

* version bump

* mark WordPress object as federated

* fix content filter issue!

fixes https://wordpress.org/support/topic/yasr-ratings-appear-on-comments-on-mastodon/

* add custom filter

thanks @janboddez for the idea https://github.com/Automattic/wordpress-activitypub/pull/645#issuecomment-1898820529

* optimize code a bit

* consts to enable/disable incoming/outgoing interactions

see https://wordpress.org/support/topic/how-to-suppress-user-comments-from-feed/

* rename state

* cleanup federation check

* fix markdown

* better handling of Create/Update/Delete

* update check
2024-02-01 11:17:03 +01:00
Jan Boddez
6e5cb57e3a
Address some of things found in #633 (#634)
* Address some of things found in #633

* Improve "state"
2024-01-05 19:53:25 +01:00
Matthias Pfefferle
a8078ce72b
Shared Inbox (#617)
* init shared inbox

* try to get user id from activity

* some code formatting

* disable ACTIVITYPUB_SHARED_INBOX_FEATURE

* done!

* do not use the inbox-user at all

* fix user check!

* fix user check!
2023-12-22 17:45:27 +01:00
Matthias Pfefferle
6e7f82bf42
Activity-Type based handlers (#551)
* init

* save source id

* fix delete and add improve undo

* test new functions

* add support for threaded comments

* some formatting

* check if URL is no longer available

...and returns either status 410 or 404.

* improve delete handler

* improve update handler

* `object` and `actor` are already required by the inbox endpoint

* fix typo

* simplify queries

* cosmetics

* fix unit tests

* schedule delete comments of deleted actor (#575)

* schedule delete comments of deleted actor

* phpcs

---------

Co-authored-by: Django Doucet <django.doucet@webdevstudios.com>

* move `get_comments_by_actor` to interactions collection

* consistent wording

* implement Tombstone

* fix follow issue

* fix inbox-create

* added missing namespace

* check if field is set

* Fix namespacing issue

* update profile and update interaction

* fields are already validated by inbox

* optimize avatar handling

---------

Co-authored-by: Django <mediaformat.ux@gmail.com>
Co-authored-by: Django Doucet <django.doucet@webdevstudios.com>
2023-11-30 11:43:48 +01:00