Commit graph

1141 commits

Author SHA1 Message Date
eb58862777 Announce all posts through the application actor
Some checks failed
PHP_CodeSniffer / phpcs (push) Has been cancelled
Unit Testing / phpunit (5.6, 6.2) (push) Has been cancelled
Unit Testing / phpunit (7.0) (push) Has been cancelled
Unit Testing / phpunit (7.2) (push) Has been cancelled
Unit Testing / phpunit (7.3) (push) Has been cancelled
Unit Testing / phpunit (7.4) (push) Has been cancelled
Unit Testing / phpunit (8.0) (push) Has been cancelled
Unit Testing / phpunit (8.1) (push) Has been cancelled
Unit Testing / phpunit (8.2) (push) Has been cancelled
Unit Testing / phpunit (latest) (push) Has been cancelled
2023-12-23 09:52:03 +01:00
fb2db28926 fix function name
Some checks are pending
PHP_CodeSniffer / phpcs (push) Waiting to run
Unit Testing / phpunit (5.6, 6.2) (push) Waiting to run
Unit Testing / phpunit (7.0) (push) Waiting to run
Unit Testing / phpunit (7.2) (push) Waiting to run
Unit Testing / phpunit (7.3) (push) Waiting to run
Unit Testing / phpunit (7.4) (push) Waiting to run
Unit Testing / phpunit (8.0) (push) Waiting to run
Unit Testing / phpunit (8.1) (push) Waiting to run
Unit Testing / phpunit (8.2) (push) Waiting to run
Unit Testing / phpunit (latest) (push) Waiting to run
2023-12-22 20:27:58 +01:00
30f9b79bbf remove redundant check 2023-12-22 20:27:49 +01:00
ea844ee942 Merge commit 'a8078ce72bc93a7d095f19b3bdde055e68939fe8' into add/transformer-management 2023-12-22 19:08:50 +01:00
d9a1beae5c WIP 2023-12-22 19:07:44 +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
6c6d9076a8 WIP: Rewrite of transformer management
Some checks are pending
PHP_CodeSniffer / phpcs (push) Waiting to run
Unit Testing / phpunit (5.6, 6.2) (push) Waiting to run
Unit Testing / phpunit (7.0) (push) Waiting to run
Unit Testing / phpunit (7.2) (push) Waiting to run
Unit Testing / phpunit (7.3) (push) Waiting to run
Unit Testing / phpunit (7.4) (push) Waiting to run
Unit Testing / phpunit (8.0) (push) Waiting to run
Unit Testing / phpunit (8.1) (push) Waiting to run
Unit Testing / phpunit (8.2) (push) Waiting to run
Unit Testing / phpunit (latest) (push) Waiting to run
2023-12-22 16:18:18 +01:00
Matthew Exon
a9c65f55d6
show admin notice when permalink structure is plain (#615)
* show admin notice when permalink structure is plain

fix #609

* fix phpcs issues

* remove calculation of static array of issues

* small changes

* removed unused attribute

---------

Co-authored-by: Matthew Exon <git.mexon@spamgourmet.com>
Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-12-22 11:42:20 +01:00
Matt Wiebe
3cda64a255
Profiles: Update followers when profile fields change (#542)
* Profiles: update followers when profile fields change

* use static

* only try to merge mention inboxes when valid

* cleanups

* add hook to wp_update_user

* update readme

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2023-12-22 11:33:25 +01:00
Matthias Pfefferle
f2b231ccac fix some small issues 2023-12-22 11:01:23 +01:00
Matthias Pfefferle
b744dc551d
Comment Federation (#550)
* Comments 1

* Delete FUNDING.yml

* Add basic BuddyPress support

fix #122

thanks and props @skysarwer

* change URL to `bp_core_get_user_domain`

* fix "Follow" issue

fix #133

* fix #135

* version bump

* Create phpunit.yml

* Update composer.json

* Update composer.json

* Update phpunit.yml

* Update composer.json

* Create phpcs.yml

* Update phpcs.xml

* Update composer.json

* phpcs fixes

* fix typo

* Comments update

* webfinger_extract remove extra param

* coding standards

* Replies Collection, settings, other fixes

* Create stale.yml

* move stale file

* code standards cleanup

* Migrate / Update script

* bugfix

* add settings link to plugin page

* fix code standards

* fix cs

* fix PHPCS

* PHPCS fixes

* change background image for wp.org

* fix docker

* fix webfinger for email identifiers

fix #152

* version bump

* update composer file to fix unit testing

* allow plugins

* fix dependencies

* Migrate tools

* code cleanup

* regression fix

* Fix announce, clarified language

* update included filename

* code cleanup

* Improve migration UX

* Add comments view, warnings to migrate page

* style fix

* more style fixes

* Fix send_delete_activity

* replace ap_comment_id to reuse  replytocom var

* Comments class missing attributes

* Post class fix attributes

* move js file to assets/js

* Separate file for Comment processing hooks

* fix file path

* associate comments to back compat post

* Fix js assets enqueue

* change regex matching potential hashtags

Matches any string starting with '#' and consisting of any number and combination of [A-Za-z0-9_] that is directly followed by whitespace or punctuation. Groups everything after '#' for access in functions using this regex.

This fixes #183 (incomplete links on hashtags containing special characters) by not matching these at all.

* also detect hashtags at the start of a paragraph

* restrict html tags after which to detect a hashtag

Hashtags should not be detected after just any html tag - for example not after an opening a or div. To still allow detection at the start of a line, allow specifically p and br to directly precede a hashtag.

* fix pagination

* Add Custom Post Type support to outbox API

* remove comment_type

* fix comparison

* remove trailing spaces

* fix phpcs issues

* fix phpcs issues

* run phpcs also on pull_requests

* fix phpcs issues

* support threaded comments from ActivityPub

* refactor support for threaded comments from ActivityPub

* remove debugging log line

* add first unit tests for class inbox

* fix code smells

* make filter function static

* attempt to resolve backwards compatibility issues

* update js to new file

* delete old js

* Remove migrate code

* update post meta canonical

* remove type and mention meta from comment filters

* extract mentions from comment_content

* phpcbf

* remove extra curly bracket

* Remove migrate code

* remove version_check()

* Update enqueue scripts

* Remove remote comments from preprocessing

* Reply to comments from Dashboard

* rename function, inserts users into reply text

* Update dispatch comments

* update comment model

* fix comment model replies property

* fix preprocess_comment cap check

* Add webfinger filter to comments

* Add comment edit datetime

* cleanup

* fix var name

* cleanup

* phpcbf

* better actual translation support

* Separate comment reply script

* migrate dispatch, migrate comment model to transform

* ignore WP_Comment type for now

* Adds new helpers for resolving inReplyTo url

* Update activitypub_send_comment_activity to include type

* remove redundant id check

* reinclude user_id in saved ap_object meta

* update post field meta

* Fix comment updated datetime

* front-end reply inserts @mentions

* enqueue reply script on front end

* use const instead of dirname

* some simplifications

* move some functions

* fixes

* some more fixes

* fix namespace

* fix unittests

* fix testcase

* fixed typo

* fix tests

* fix tests

* fix PHPCS

* move functions to transformer class

* fix warnings

* Link remote comments on frontend

* Link to comment source as row action

* Init Comments class

* remove dead dispatch action

* re-add extract mentions filter

* Restore and tweak Comment transform

* Schedule comments activities for non-admin users

* lint

* remove context property

* rename get_id method to generate_id

* fix locale

* move functions

* PHPDoc

* this is never used

* remove some edit methods

* remove replies for now

* remove JS calls

* remove reply_recipients

* never used

* remove other query-vars

* otherwise to_json would not work properly

* small changes

* use `c` for comment IDs

* remove comments.php for now

maybe re-add it later

* wp_insert_post is an action

* also parse comment_text

* remove duplicate functions

* add Base transformer

* remove invalid test

* update to new query var

* update dispatcher to support comments and posts

* fix transition

* remove unused functions for now

* schedule_comment_activity seems to ignore create and update

* fix wrong use of functions!

* not every platforms sends an URL

* check source-id first

* remove hashtags for now

* fallback to ID

* fix typo

* move to_activity to Base class

* remove unused function

* add support for announce and like

* also ping inboxes of other commenters in the thread

* restructure WebFinger class

* some small improvements

* simplified to_object class

props @Menrath for the feedback and the idea!

* fix unit tests

* make transformer filterable

/cc @Menrath

* use transformer factory, so that transformer can be overwritten

* phpcs fixes

* fix attachments

* fix comment transformer

* remove comments for now

* update readme/changelog

* simplify and unify json_encodes

---------

Co-authored-by: Django Doucet <mediaformat.ux@gmail.com>
Co-authored-by: Andreas <andreas@bocops.de>
Co-authored-by: Eana Hufwe <eana@1a23.com>
Co-authored-by: Matthew Exon <git.mexon@spamgourmet.com>
Co-authored-by: Django Doucet <django.doucet@webdevstudios.com>
2023-12-22 10:12:26 +01:00
Matthias Pfefferle
a3ea9955d9 fix issue with wrong object init! 2023-12-21 17:27:43 +01:00
André Menrath
45e6ace890
Add nodeinfo metadata (#618)
* add nodeinfo metadata
nodeName, nodeDescription and nodeIcon

* Fix CS: double space typo
2023-12-21 16:05:32 +01:00
Matthias Pfefferle
5ce8f28852 fix nodeinfo integration 2023-12-21 15:19:18 +01:00
Matthias Pfefferle
f4cab6647d fix application user 2023-12-21 10:10:55 +01:00
Matthias Pfefferle
6f1a9a1f7f
added FEP-2677 (#613)
* added FEP-2677

This PR enables [FEP-2677: Identifying the Application Actor](https://codeberg.org/fediverse/fep/src/branch/main/fep/2677/fep-2677.md)

@Menrath I needed a small task for in between ;)

* update changelog
2023-12-21 10:06:37 +01:00
Matthias Pfefferle
39c9288987
Improve/webfinger (#616)
* Fix some WebFinger issues

* update changelog
2023-12-21 10:04:15 +01:00
Kan-Ru Chen
a47c9cd7ae
replace excerpt_more with custom filter activitypub_excerpt_more for better consistency (#610) 2023-12-16 07:36:45 +01:00
Matthias Pfefferle
97e2bbfe7a remove systems cron warning
fix #525
2023-12-15 07:45:11 +01:00
Matthias Pfefferle
ae26609e5e update FAQ 2023-12-13 11:33:34 +01:00
Matthias Pfefferle
a2e5fc2021
Add CSS class for AP comments to allow custom designs (#602)
* Add CSS class for AP comments to allow custom designs

fix #600

* updated changelog
2023-12-12 14:01:43 +01:00
Matthias Pfefferle
9f8bad3e8d
Make Post-Template filterable (#597)
* make template filterable

prepare #596

also #519

* updated changelog
2023-12-12 13:58:44 +01:00
Matthias Pfefferle
77c508059b
Remove deprecated classes (#604) 2023-12-12 13:47:01 +01:00
Matthias Pfefferle
431c4a2676
WebFinger: Add support for URLs (#594)
* add support for URLs

* phpcs

* simplify vars
2023-12-11 10:28:41 +01:00
Matthias Pfefferle
e5fe4f20b7
some phpcs fixes (#590)
* some phpcs fixes

* add default $hashalg
2023-12-07 12:30:44 +01:00
Matthias Pfefferle
93b2f1ee7d
Normalize attributes that can have mixed value types (#586)
* fix #571

* support empty values

* fix phpcs issues

* test for `null`

* use `object_to_uri`  on followers list
2023-12-05 18:59:00 +01:00
Matthias Pfefferle
ef96008cb3 prepare 1.3.0 2023-12-05 13:39:14 +01:00
Matthias Pfefferle
a59408d6b8 clear inbox cache after update 2023-12-05 13:39:00 +01:00
Matthias Pfefferle
24c534961a add missing nopaging attribute 2023-12-05 13:27:14 +01:00
Matthias Pfefferle
db846729db allow <p> and <br /> only for Activities 2023-12-05 13:21:24 +01:00
Matthias Pfefferle
cf541b41b4 update readme 2023-12-05 12:52:56 +01:00
Matthias Pfefferle
8c93d36d95 fix PHPCS issue 2023-12-05 12:52:28 +01:00
Matthias Pfefferle
15179f2c5a I think <p> and <br /> are fine for all usecases 2023-12-05 12:21:29 +01:00
Matthias Pfefferle
eecdb63da3 updated changelog 2023-12-04 19:09:00 +01:00
Matthias Pfefferle
5d417d9f5c remove paging from get_all_followers
and add tests
2023-12-04 10:02:30 +01:00
Sam Lade
ca9e71ffc1
Fix sending posts to at most ten instances (#588) 2023-12-02 10:58:19 +01:00
dependabot[bot]
c3a18d72dd
Update dms/phpunit-arraysubset-asserts requirement from ^0.4.0 to ^0.5.0 (#585) 2023-12-01 07:26:29 +00:00
Matthias Pfefferle
c3d5b4bb1a updated readme 2023-11-30 16:41:05 +01:00
Matthias Pfefferle
9bd8659e97 updated changelog 2023-11-30 13:04:21 +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
Matthias Pfefferle
4a72329bbe fix #573 2023-11-29 10:47:31 +01:00
Matt Wiebe
cffff80b54
Blocks: add alt text to avatars (#579) 2023-11-27 14:35:14 -06:00
Matthias Pfefferle
1f5ef3ea2c Add Group Identifier to WebFinger endpoint 2023-11-27 13:51:30 +01:00
mdingemanse
e529b19b8b
Clarifying what [ap_excerpt] does (#578)
* clarifying excerpt

* Update help.php to clarify what [ap_excerpt] does
2023-11-26 21:18:03 +01:00
Matthias Pfefferle
8849e7b446
Check if the current post type supports ActivityPub. (#570)
* Check if the current post type supports ActivityPub.

* Update includes/functions.php

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

* Update functions.php

---------

Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
2023-11-23 18:00:40 +01:00
Matthias Pfefferle
ba44ac701b remove var_dump 2023-11-21 15:05:47 +01:00
Matthias Pfefferle
1af821621b check if ID is set
fallback to URL
2023-11-21 15:05:12 +01:00
Matthias Pfefferle
d00e5a03c8 check if $resource is set 2023-11-21 15:00:39 +01:00
Matthias Pfefferle
60148a3b65 check if user is available 2023-11-21 14:57:44 +01:00
Matthias Pfefferle
d226564325 prepare v1.2.0 2023-11-18 12:01:29 +01:00