updated plugin ActivityPub version 0.10.1

This commit is contained in:
KawaiiPunk 2020-05-04 15:57:04 +00:00 committed by Gitium
parent d201566960
commit bedbe7cc3f
6 changed files with 16 additions and 13 deletions

View File

@ -3,7 +3,7 @@
* Plugin Name: ActivityPub * Plugin Name: ActivityPub
* Plugin URI: https://github.com/pfefferle/wordpress-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. * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
* Version: 0.10.0 * Version: 0.10.1
* Author: Matthias Pfefferle * Author: Matthias Pfefferle
* Author URI: https://notiz.blog/ * Author URI: https://notiz.blog/
* License: MIT * License: MIT

View File

@ -11,7 +11,7 @@ class Debug {
* Initialize the class, registering WordPress hooks * Initialize the class, registering WordPress hooks
*/ */
public static function init() { public static function init() {
if ( WP_DEBUG_LOG ) { if ( WP_DEBUG && WP_DEBUG_LOG ) {
\add_action( 'activitypub_safe_remote_post_response', array( '\Activitypub\Debug', 'log_remote_post_responses' ), 10, 4 ); \add_action( 'activitypub_safe_remote_post_response', array( '\Activitypub\Debug', 'log_remote_post_responses' ), 10, 4 );
} }
} }

View File

@ -301,9 +301,7 @@ function get_blacklist() {
// if no values have been set, revert to the defaults // if no values have been set, revert to the defaults
if ( ! $blacklist || ! $blacklist_hosts || ! \is_array( $blacklist_hosts ) ) { if ( ! $blacklist || ! $blacklist_hosts || ! \is_array( $blacklist_hosts ) ) {
$blacklist_hosts = array( $blacklist_hosts = array();
'gab.com',
);
} }
// clean out any blank values // clean out any blank values

View File

@ -136,7 +136,7 @@ class Inbox {
$params['actor'] = array( $params['actor'] = array(
'required' => true, 'required' => true,
'type' => array( 'object', 'string' ), //'type' => array( 'object', 'string' ),
'validate_callback' => function( $param, $request, $key ) { 'validate_callback' => function( $param, $request, $key ) {
if ( ! \is_string( $param ) ) { if ( ! \is_string( $param ) ) {
$param = $param['id']; $param = $param['id'];
@ -153,8 +153,8 @@ class Inbox {
$params['type'] = array( $params['type'] = array(
'required' => true, 'required' => true,
'type' => 'enum', //'type' => 'enum',
'enum' => array( 'Create' ), //'enum' => array( 'Create' ),
'sanitize_callback' => function( $param, $request, $key ) { 'sanitize_callback' => function( $param, $request, $key ) {
return \strtolower( $param ); return \strtolower( $param );
}, },
@ -162,7 +162,7 @@ class Inbox {
$params['object'] = array( $params['object'] = array(
'required' => true, 'required' => true,
'type' => 'object', //'type' => 'object',
); );
return $params; return $params;

View File

@ -2,10 +2,10 @@
# This file is distributed under the MIT. # This file is distributed under the MIT.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ActivityPub 0.10.0\n" "Project-Id-Version: ActivityPub 0.10.1\n"
"Report-Msgid-Bugs-To: " "Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/wordpress-activitypub\n" "https://wordpress.org/support/plugin/wordpress-activitypub\n"
"POT-Creation-Date: 2020-03-15 19:34:14+00:00\n" "POT-Creation-Date: 2020-05-03 22:06:03+00:00\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"

View File

@ -3,8 +3,8 @@ Contributors: pfefferle
Donate link: https://notiz.blog/donate/ Donate link: https://notiz.blog/donate/
Tags: OStatus, fediverse, activitypub, activitystream Tags: OStatus, fediverse, activitypub, activitystream
Requires at least: 4.7 Requires at least: 4.7
Tested up to: 5.3 Tested up to: 5.4.1
Stable tag: 0.10.0 Stable tag: 0.10.1
Requires PHP: 5.6 Requires PHP: 5.6
License: MIT License: MIT
License URI: http://opensource.org/licenses/MIT License URI: http://opensource.org/licenses/MIT
@ -88,6 +88,11 @@ 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). Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
= 0.10.1 =
* fix inbox activities, like follow
* fix debug
= 0.10.0 = = 0.10.0 =
* add image alt text to the ActivityStreams attachment property in a format that Mastodon can read. props [@BenLubar](https://github.com/BenLubar) * add image alt text to the ActivityStreams attachment property in a format that Mastodon can read. props [@BenLubar](https://github.com/BenLubar)