Skip to content

Commit 6795d70

Browse files
committed
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
1 parent 8408374 commit 6795d70

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Tags:** OStatus, fediverse, activitypub, activitystream
55
**Requires at least:** 4.7
66
**Tested up to:** 5.8
7-
**Stable tag:** 0.13.0
7+
**Stable tag:** 0.13.1
88
**Requires PHP:** 5.6
99
**License:** MIT
1010
**License URI:** http://opensource.org/licenses/MIT
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
### 0.13.1 ###
92+
93+
* fix Inbox issue
94+
9195
### 0.13.0 ###
9296

9397
* add Autor URL and WebFinger health checks

activitypub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: ActivityPub
44
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
55
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
6-
* Version: 0.13.0
6+
* Version: 0.13.1
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

includes/rest/class-inbox.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ public static function register_routes() {
3434
'args' => self::shared_inbox_request_parameters(),
3535
'permission_callback' => '__return_true',
3636
),
37-
array(
38-
'methods' => \WP_REST_Server::READABLE,
39-
'callback' => array( '\Activitypub\Rest\Inbox', 'inbox_get' ),
40-
'permission_callback' => '__return_true',
41-
),
4237
)
4338
);
4439

@@ -52,7 +47,7 @@ public static function register_routes() {
5247
),
5348
array(
5449
'methods' => \WP_REST_Server::READABLE,
55-
'callback' => array( '\Activitypub\Rest\Inbox', 'inbox_get' ),
50+
'callback' => array( '\Activitypub\Rest\Inbox', 'user_inbox_get' ),
5651
'permission_callback' => '__return_true',
5752
),
5853
)
@@ -94,7 +89,8 @@ public static function serve_request( $served, $result, $request, $server ) {
9489
* @param WP_REST_Request $request
9590
* @return WP_REST_Response
9691
*/
97-
public static function inbox_get( $request ) {
92+
public static function user_inbox_get( $request ) {
93+
$user_id = $request->get_param( 'user_id' );
9894
$page = $request->get_param( 'page', 0 );
9995

10096
/*

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/
44
Tags: OStatus, fediverse, activitypub, activitystream
55
Requires at least: 4.7
66
Tested up to: 5.8
7-
Stable tag: 0.13.0
7+
Stable tag: 0.13.1
88
Requires PHP: 5.6
99
License: MIT
1010
License URI: http://opensource.org/licenses/MIT
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
= 0.13.1 =
92+
93+
* fix Inbox issue
94+
9195
= 0.13.0 =
9296

9397
* add Autor URL and WebFinger health checks

0 commit comments

Comments
 (0)