fixes JSON representation of posts

https://merveilles.town/@xuv/101907542498716956
This commit is contained in:
Matthias Pfefferle 2019-04-13 20:07:56 +02:00
parent 8d91b213e7
commit 8b1367a16d
5 changed files with 18 additions and 11 deletions

View file

@ -3,8 +3,8 @@
**Donate link:** https://notiz.blog/donate/
**Tags:** OStatus, fediverse, activitypub, activitystream
**Requires at least:** 4.7
**Tested up to:** 5.1.1
**Stable tag:** 0.7.1
**Tested up to:** 5.2
**Stable tag:** 0.7.2
**Requires PHP:** 5.6
**License:** MIT
**License URI:** http://opensource.org/licenses/MIT
@ -62,6 +62,10 @@ To implement:
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
### 0.7.2 ###
* fixes JSON representation of posts https://merveilles.town/@xuv/101907542498716956
### 0.7.1 ###
* fixed inbox problems with pleroma

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.7.1
* Version: 0.7.2
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT

View file

@ -2,9 +2,9 @@
# This file is distributed under the MIT.
msgid ""
msgstr ""
"Project-Id-Version: ActivityPub 0.7.1\n"
"Project-Id-Version: ActivityPub 0.7.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/activitypub\n"
"POT-Creation-Date: 2019-03-14 22:10:06+00:00\n"
"POT-Creation-Date: 2019-04-13 18:07:11+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -106,7 +106,7 @@ msgstr ""
#: includes/rest/class-followers.php:46 includes/rest/class-followers.php:49
#: includes/rest/class-following.php:46 includes/rest/class-following.php:49
#: includes/rest/class-outbox.php:47 includes/rest/class-outbox.php:50
#: includes/rest/class-outbox.php:45 includes/rest/class-outbox.php:48
#: includes/rest/class-webfinger.php:61
msgid "User not found"
msgstr ""

View file

@ -3,8 +3,8 @@ Contributors: pfefferle
Donate link: https://notiz.blog/donate/
Tags: OStatus, fediverse, activitypub, activitystream
Requires at least: 4.7
Tested up to: 5.1.1
Stable tag: 0.7.1
Tested up to: 5.2
Stable tag: 0.7.2
Requires PHP: 5.6
License: MIT
License URI: http://opensource.org/licenses/MIT
@ -62,6 +62,10 @@ To implement:
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
= 0.7.2 =
* fixes JSON representation of posts https://merveilles.town/@xuv/101907542498716956
= 0.7.1 =
* fixed inbox problems with pleroma

View file

@ -2,11 +2,10 @@
$post = get_post();
$activitypub_post = new \Activitypub\Post( $post );
$activitypub_activity = new \Activitypub\Activity( 'Create', \Activitypub\Activity::TYPE_FULL );
$activitypub_activity->from_post( $activitypub_post->to_array() );
$json = array_merge( array( '@context' => \Activitypub\get_context() ), $activitypub_post->to_array() );
// filter output
$json = apply_filters( 'activitypub_json_post_array', $activitypub_activity->to_array() );
$json = apply_filters( 'activitypub_json_post_array', $json );
/*
* Action triggerd prior to the ActivityPub profile being created and sent to the client