Commit graph

1193 commits

Author SHA1 Message Date
Matthias Pfefferle
fadd1986ae version bump 2024-02-13 18:30:56 +01:00
Matthias Pfefferle
7913faaa77
Add @ prefix to Follow-Block (#694) 2024-02-13 10:51:19 +01:00
Matthias Pfefferle
1d6c8eaab0
Apply comment_text filter to Activity (#695) 2024-02-13 10:51:01 +01:00
Matthias Pfefferle
61b770f40d fix reply-context 2024-02-12 11:57:57 +01:00
Matthias Pfefferle
2705703ced
Add all repliers as Mentions (#692)
* Add all repliers as Mentions

Add all repliers as Mentions so that they receive notifications.

See: https://wordpress.org/support/topic/ux-deviation-from-expected-behaviour-in-2-0/

* Fix readme

* typo
2024-02-12 11:30:01 +01:00
Matthias Pfefferle
dd911564ce fix version number 2024-02-12 11:16:17 +01:00
Matthias Pfefferle
3b21061c49
re-add vary header (#683)
* re-add vary header

fixes #580

* add Const to enable/disable `Vary` header

* lets start with default "off"
2024-02-12 11:09:16 +01:00
Matthias Pfefferle
20adc4cc97 fix #690 2024-02-11 12:44:46 +01:00
Matthias Pfefferle
223270f2a7 queue only deletes if follower exists 2024-02-10 20:41:47 +01:00
Matthias Pfefferle
2ed1534471 move generate_id to utils class 2024-02-09 16:31:09 +01:00
Matthias Pfefferle
ec24523df2 only disable comments for replies from the fediverse 2024-02-09 15:49:38 +01:00
Jan Boddez
742fbda212
Update class-scheduler.php (#688) 2024-02-09 14:08:18 +01:00
Matthias Pfefferle
98824d3a08 tweak federation state a bit 2024-02-07 17:54:48 +01:00
Matthias Pfefferle
a4f8c3084d fix comment federation
fix #671

@janboddez comments from a blog owner, that are direct replies to the post should now be federated properly. can you verify that?
2024-02-06 10:14:42 +01:00
Matthias Pfefferle
4a77436427 version bump 2024-02-01 11:20:15 +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
Matthias Pfefferle
484cc56677
fix ActivityPub @context (#682)
The `call_user_func` version seem to not work properly in this case.

/cc @Menrath
2024-01-31 16:31:22 +01:00
Matthias Pfefferle
c3c987a765
improve the settings screen (#681) 2024-01-30 21:29:09 +01:00
Matthias Pfefferle
e8f1f21a3e consistent wording 2024-01-29 09:04:26 +01:00
Matthias Pfefferle
25275f2c00 FAQ: Follower Lists
fix #660
2024-01-29 09:01:19 +01:00
Jan Boddez
a1f513393e
Update class-scheduler.php (#679) 2024-01-27 17:30:45 +01:00
Jan Boddez
2b8480fa1c
Fix #621 (#677)
* Update class-follower.php

Just a test

* Update class-follower.php

* Update class-follower.php

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-01-26 17:37:13 +01:00
Alex Kirk
dad6b73cdb
Enable Mastodon Apps: Add followers_count to internal accounts (#676)
* Mock http requests, add followers_count to account object

* Remove one more MockAction

* Add one more assert

* cleanup

* cleanup

* use Users class, to check if user is really an ActivityPub user

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-01-26 17:34:02 +01:00
Alex Kirk
e560d1b5b6
Enable Mastodon Apps: Implement the account endpoint for an external account (#674)
* Implement the account endpoint for an external account

* phpcs

* typos

* Change namespace calling

* Populate with more data

* phpcs

* some formatting

* some phpdoc

* Potentially extend an existing account

props @pfefferle

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

* phpcs

* Switch to using jsonSerialize

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-01-25 15:54:35 +01:00
Matthias Pfefferle
48feabe39e
Improve post-type support (#675)
* Improve post-type support

* Remove `page` from default types (fix #665)
* Add description to settings (fix #673)

* fix tests
2024-01-25 15:51:21 +01:00
dependabot[bot]
873de246a7
Bump @wordpress/scripts from 26.19.0 to 27.0.0 (#663)
Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 26.19.0 to 27.0.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@27.0.0/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-01-22 14:26:35 -06:00
Matthias Pfefferle
1a7c9a5ea9 better checks to prevent possible PHP errors 2024-01-22 12:15:33 +01:00
Matthias Pfefferle
3d1fab501d use esc_textarea 2024-01-22 11:50:32 +01:00
André Menrath
174262d22c
Add/event objects (#629)
* remove redundant property definitions

* Add redused context for actors.

* Add classes to construct Moblizon compatible events

* Bind the context to the activitypub object
- change the propertyname  which stores the json-ld context from context to _context, because context is already reserved in the ActivityStreams vocabulary.
- cleanup currently unused code

* fix phpcs

* Remove PostalAddress object: it's enough (at least atm) to directly write the array in transformers.

* Remove _context property from ActivityPub objects in favour of getter function get_json_ld_context()

* fix unit tests: ActivityPub Activity objects have a custom getter for the JsonLD context

* fix phpcs

* fix unit-tests to also support php5.6

* fix phpcs

* add param include_json_ld_context to to_array function
This allows to not set the @context in the resulting array.

* propagate the param include_json_ld_context to nested calls of to_array.

* fix phpcs

* Nested AcitivityPub objects: never build context in inner items in to_array function

* fix: param of set_address may also be an array

* fix typo in comment

* always prefix json-ld context with json-ld and move event class to sub-namespace

* fix usage of reserved object keyword
seems it should not be used as a namespace either

* Merge commit 'b2271cda6b857f879e0abd4f3c6683642d725267' into add/event-objects

* Fix calling non-static function as static

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

* Partly fix Json-LD contexts in collections

* Update includes/activity/class-base-object.php

* this is implicit

We already set the correct user with `$transformer->change_wp_user_id( $user_id );` so the Actor will be generated properly. We can change the behaviour, but we should not use both.

* this change prevents the Activity to re-use Object vars

this should stay as is, because it pre-fills the Activity with data (for example cc and to) and it will no longer be done with your change.

It is on purpose that it first sets the object and then replaces it with the URI.

See: https://github.com/Automattic/wordpress-activitypub/blob/master/includes/activity/class-activity.php#L195

* add `$include_json_ld_context` support to `to_json`

* disable some more contexts

* remove whitespace

* Add php-comment for 7ed17c042a

* Fix JSON-LD context for ActivityPub objects: child classes may override it.

* coding standards

* call folder/namespace `Extended_Object`

 to be consistent with folder names in singular

* fix: unnessesary nesting of extended-objects

* remove license

I hope this is fine, to have the complete plugin under the MIT @Menrath ?!?

---------

Co-authored-by: Matthias Pfefferle <pfefferle@users.noreply.github.com>
2024-01-18 16:35:52 +01:00
Matthias Pfefferle
b612ce0f8e check if blog author is enabled or not
thanks for your help with debugging @akirk
2024-01-18 15:54:42 +01:00
Matthias Pfefferle
4fafea35e7
implements a basic followers endpoint for the mastodon api (#666)
* implements a basic followers endpoint for the mastodon api

see https://github.com/akirk/enable-mastodon-apps/pull/67

/cc @akirk

* fix php 5.6 issue
2024-01-18 13:38:02 +01:00
Matthias Pfefferle
b2271cda6b unschedule old hooks
related #639
2024-01-13 20:29:16 +01:00
Matthias Pfefferle
d6842616c7 fallback to ID id URL is not set 2024-01-12 16:51:33 +01:00
Matthias Pfefferle
7e35c1e8b9 version bump 2024-01-12 16:07:56 +01:00
Matthias Pfefferle
88ab98005e fix deprecated class 2024-01-12 16:07:48 +01:00
Matthias Pfefferle
9f09bfbcf4 re-add Post model
workaround for #639
2024-01-12 16:02:40 +01:00
Matthias Pfefferle
e23c65f295 remove whitespaces 2024-01-12 10:10:14 +01:00
Matthias Pfefferle
fba1c42dc0
fix comment update federation (#651)
fix #649
2024-01-12 10:08:07 +01:00
Jan Boddez
b243ca9301
Update class-activitypub.php (#650) 2024-01-11 22:41:47 +01:00
Matthias Pfefferle
f7d535b885 Revert "introduce a filter to check if an activity should be sent or not"
This reverts commit 62b73d251a.
2024-01-11 14:15:46 +01:00
Matthias Pfefferle
62b73d251a introduce a filter to check if an activity should be sent or not 2024-01-11 14:15:15 +01:00
Matthias Pfefferle
bdd8ab804f fix mentions and finally add dot support 2024-01-10 20:57:40 +01:00
Matthias Pfefferle
1fe2ff7ca5 remove dot 2024-01-10 20:49:38 +01:00
Matthias Pfefferle
f3753f2150 re-order positions 2024-01-10 20:42:02 +01:00
Matthias Pfefferle
907ae508b1 escape dot 2024-01-10 20:38:39 +01:00
Matthias Pfefferle
23d7d84f35 support dots in the user part of WebFinger 2024-01-10 20:34:18 +01:00
Matthias Pfefferle
48a33b82e9 always use application user to check webfinger endpoint
see #627
2024-01-10 11:06:01 +01:00
Sam Lade
d09b2ae9f3
Fix classic editor image finding for large images (#643)
The filename with -scaled in it is used as the primary key in this case.
Fix lookups to take this into account.
2024-01-10 10:44:45 +01:00
Matthias Pfefferle
20a49edb1b fix #627 2024-01-10 10:27:05 +01:00
Matthias Pfefferle
3f8d6af7fc version bump 2024-01-09 09:44:40 +01:00