Skip to content

Commit

Permalink
fix "Follow" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Nov 17, 2021
1 parent a9aed5b commit 7b262fd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** OStatus, fediverse, activitypub, activitystream
**Requires at least:** 4.7
**Tested up to:** 5.8
**Stable tag:** 0.13.1
**Stable tag:** 0.13.2
**Requires PHP:** 5.6
**License:** MIT
**License URI:** http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -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.2 ###

* fix Follow issue AGAIN

### 0.13.1 ###

* fix Inbox issue
Expand Down
2 changes: 1 addition & 1 deletion activitypub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
* Version: 0.13.2
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT
Expand Down
15 changes: 9 additions & 6 deletions includes/rest/class-inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public static function user_inbox_post( $request ) {

$data = $request->get_params();
$type = $request->get_param( 'type' );
$type = \strtolower( $type );

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

foreach ( $users as $user ) {
$type = \strtolower( $type );

\do_action( 'activitypub_inbox', $data, $user->ID, $type );
\do_action( "activitypub_inbox_{$type}", $data, $user->ID );
}
Expand Down Expand Up @@ -216,9 +219,9 @@ public static function user_inbox_request_parameters() {
'required' => true,
//'type' => 'enum',
//'enum' => array( 'Create' ),
'sanitize_callback' => function( $param, $request, $key ) {
return \strtolower( $param );
},
//'sanitize_callback' => function( $param, $request, $key ) {
// return \strtolower( $param );
//},
);

$params['object'] = array(
Expand Down Expand Up @@ -261,9 +264,9 @@ public static function shared_inbox_request_parameters() {
'required' => true,
//'type' => 'enum',
//'enum' => array( 'Create' ),
'sanitize_callback' => function( $param, $request, $key ) {
return \strtolower( $param );
},
//'sanitize_callback' => function( $param, $request, $key ) {
// return \strtolower( $param );
//},
);

$params['object'] = array(
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
Stable tag: 0.13.2
Requires PHP: 5.6
License: MIT
License URI: http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -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.2 =

* fix Follow issue AGAIN

= 0.13.1 =

* fix Inbox issue
Expand Down

0 comments on commit 7b262fd

Please sign in to comment.