fix Inbox issue

fix `PHP Warning: Undefined variable $user_id in wp-content/plugins/activitypub/includes/rest/class-inbox.php on line 111`

https://github.com/pfefferle/wordpress-activitypub/issues/88#issuecomment-886254210
This commit is contained in:
Matthias Pfefferle 2021-07-26 09:48:51 +02:00
parent 8408374bce
commit 6795d707c8
4 changed files with 14 additions and 10 deletions

View file

@ -4,7 +4,7 @@
**Tags:** OStatus, fediverse, activitypub, activitystream
**Requires at least:** 4.7
**Tested up to:** 5.8
**Stable tag:** 0.13.0
**Stable tag:** 0.13.1
**Requires PHP:** 5.6
**License:** MIT
**License URI:** http://opensource.org/licenses/MIT
@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
### 0.13.1 ###
* fix Inbox issue
### 0.13.0 ###
* add Autor URL and WebFinger health checks

View file

@ -3,7 +3,7 @@
* Plugin Name: ActivityPub
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
* Version: 0.13.0
* Version: 0.13.1
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT

View file

@ -34,11 +34,6 @@ class Inbox {
'args' => self::shared_inbox_request_parameters(),
'permission_callback' => '__return_true',
),
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( '\Activitypub\Rest\Inbox', 'inbox_get' ),
'permission_callback' => '__return_true',
),
)
);
@ -52,7 +47,7 @@ class Inbox {
),
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( '\Activitypub\Rest\Inbox', 'inbox_get' ),
'callback' => array( '\Activitypub\Rest\Inbox', 'user_inbox_get' ),
'permission_callback' => '__return_true',
),
)
@ -94,7 +89,8 @@ class Inbox {
* @param WP_REST_Request $request
* @return WP_REST_Response
*/
public static function inbox_get( $request ) {
public static function user_inbox_get( $request ) {
$user_id = $request->get_param( 'user_id' );
$page = $request->get_param( 'page', 0 );
/*

View file

@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/
Tags: OStatus, fediverse, activitypub, activitystream
Requires at least: 4.7
Tested up to: 5.8
Stable tag: 0.13.0
Stable tag: 0.13.1
Requires PHP: 5.6
License: MIT
License URI: http://opensource.org/licenses/MIT
@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
= 0.13.1 =
* fix Inbox issue
= 0.13.0 =
* add Autor URL and WebFinger health checks