Skip to content

Commit 7b262fd

Browse files
committed
fix "Follow" issue
fix #133
1 parent a9aed5b commit 7b262fd

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
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.1
7+
**Stable tag:** 0.13.2
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.2 ###
92+
93+
* fix Follow issue AGAIN
94+
9195
### 0.13.1 ###
9296

9397
* fix Inbox issue

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.1
6+
* Version: 0.13.2
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

includes/rest/class-inbox.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public static function user_inbox_post( $request ) {
139139

140140
$data = $request->get_params();
141141
$type = $request->get_param( 'type' );
142+
$type = \strtolower( $type );
142143

143144
\do_action( 'activitypub_inbox', $data, $user_id, $type );
144145
\do_action( "activitypub_inbox_{$type}", $data, $user_id );
@@ -173,6 +174,8 @@ public static function shared_inbox_post( $request ) {
173174
}
174175

175176
foreach ( $users as $user ) {
177+
$type = \strtolower( $type );
178+
176179
\do_action( 'activitypub_inbox', $data, $user->ID, $type );
177180
\do_action( "activitypub_inbox_{$type}", $data, $user->ID );
178181
}
@@ -216,9 +219,9 @@ public static function user_inbox_request_parameters() {
216219
'required' => true,
217220
//'type' => 'enum',
218221
//'enum' => array( 'Create' ),
219-
'sanitize_callback' => function( $param, $request, $key ) {
220-
return \strtolower( $param );
221-
},
222+
//'sanitize_callback' => function( $param, $request, $key ) {
223+
// return \strtolower( $param );
224+
//},
222225
);
223226

224227
$params['object'] = array(
@@ -261,9 +264,9 @@ public static function shared_inbox_request_parameters() {
261264
'required' => true,
262265
//'type' => 'enum',
263266
//'enum' => array( 'Create' ),
264-
'sanitize_callback' => function( $param, $request, $key ) {
265-
return \strtolower( $param );
266-
},
267+
//'sanitize_callback' => function( $param, $request, $key ) {
268+
// return \strtolower( $param );
269+
//},
267270
);
268271

269272
$params['object'] = array(

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.1
7+
Stable tag: 0.13.2
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.2 =
92+
93+
* fix Follow issue AGAIN
94+
9195
= 0.13.1 =
9296

9397
* fix Inbox issue

0 commit comments

Comments
 (0)